Explorar o código

Use full path file names to express dependencies.

This is especially important for the Visual Studio 10
generator and its quirky current working directory
behavior.

Also, emit more information about exactly what files are
out of date when cmakeCheckStampFile returns false.
David Cole %!s(int64=15) %!d(string=hai) anos
pai
achega
616462ce45
Modificáronse 2 ficheiros con 8 adicións e 3 borrados
  1. 5 3
      Source/cmLocalVisualStudio7Generator.cxx
  2. 3 0
      Source/cmake.cxx

+ 5 - 3
Source/cmLocalVisualStudio7Generator.cxx

@@ -270,9 +270,11 @@ cmSourceFile* cmLocalVisualStudio7Generator::CreateVCProjBuildRule()
   cmCustomCommandLines commandLines;
   commandLines.push_back(commandLine);
   const char* no_working_directory = 0;
-  this->Makefile->AddCustomCommandToOutput(stampName.c_str(), listFiles,
-                                           makefileIn.c_str(), commandLines,
-                                           comment.c_str(),
+  std::string fullpathStampName = this->Convert(stampName.c_str(), FULL,
+                                            UNCHANGED);
+  this->Makefile->AddCustomCommandToOutput(fullpathStampName.c_str(),
+                                           listFiles, makefileIn.c_str(),
+                                           commandLines, comment.c_str(),
                                            no_working_directory, true);
   if(cmSourceFile* file = this->Makefile->GetSource(makefileIn.c_str()))
     {

+ 3 - 0
Source/cmake.cxx

@@ -3906,6 +3906,9 @@ static bool cmakeCheckStampFile(const char* stampName)
       // build system is really out of date.
       std::cout << "CMake is re-running because " << stampName
                 << " is out-of-date.\n";
+      std::cout << "  the file '" << dep << "'\n";
+      std::cout << "  is newer than '" << stampDepends << "'\n";
+      std::cout << "  result='" << result << "'\n";
       return false;
       }
     }