瀏覽代碼

use short path to get unique path names for depend path output

Bill Hoffman 23 年之前
父節點
當前提交
8f89fe11c7
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      Source/cmUnixMakefileGenerator.cxx

+ 7 - 1
Source/cmUnixMakefileGenerator.cxx

@@ -1387,7 +1387,13 @@ void cmUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
             {
             std::string dependfile = 
               this->ConvertToOutputPath(cmSystemTools::CollapseFullPath(dep->c_str()).c_str());
-            if(emitted.insert(dependfile).second)
+            // use the short path function to create uniqe names
+            std::string shortpath;
+            if(!cmSystemTools::GetShortPath(dependfile.c_str(), shortpath))
+              {
+              shortpath = dependfile;
+              }
+            if(emitted.insert(shortpath).second)
               {
               fout << " \\\n" << dependfile ;
               }