1
0
Эх сурвалжийг харах

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

Bill Hoffman 23 жил өмнө
parent
commit
8f89fe11c7

+ 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 ;
               }