Pārlūkot izejas kodu

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

Bill Hoffman 23 gadi atpakaļ
vecāks
revīzija
8f89fe11c7
1 mainītis faili ar 7 papildinājumiem un 1 dzēšanām
  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 ;
               }