Kaynağa Gözat

Xcode: Fix ReRunCMake.make path to cmake.check_cache (#13603)

The path must be either absolute or relative to the working directory
from which the makefile will be loaded.  In subprojects this is not
relative to the top of the build tree.

Reported-by: David Weese <[email protected]>
Brad King 13 yıl önce
ebeveyn
işleme
388a3216fc
1 değiştirilmiş dosya ile 6 ekleme ve 2 silme
  1. 6 2
      Source/cmGlobalXCodeGenerator.cxx

+ 6 - 2
Source/cmGlobalXCodeGenerator.cxx

@@ -495,8 +495,12 @@ void cmGlobalXCodeGenerator::CreateReRunCMakeFile(
     (this->CurrentReRunCMakeMakefile.c_str());
     (this->CurrentReRunCMakeMakefile.c_str());
   makefileStream.SetCopyIfDifferent(true);
   makefileStream.SetCopyIfDifferent(true);
   makefileStream << "# Generated by CMake, DO NOT EDIT\n";
   makefileStream << "# Generated by CMake, DO NOT EDIT\n";
-  makefileStream << cmake::GetCMakeFilesDirectoryPostSlash();
-  makefileStream << "cmake.check_cache: ";
+  std::string checkCache = mf->GetHomeOutputDirectory();
+  checkCache += "/";
+  checkCache += cmake::GetCMakeFilesDirectoryPostSlash();
+  checkCache += "cmake.check_cache";
+  makefileStream << this->ConvertToRelativeForMake(checkCache.c_str())
+                 << ": ";
   for(std::vector<std::string>::const_iterator i = lfiles.begin();
   for(std::vector<std::string>::const_iterator i = lfiles.begin();
       i !=  lfiles.end(); ++i)
       i !=  lfiles.end(); ++i)
     {
     {