diff options
-rw-r--r-- | Source/CPack/cmCPackGenerator.cxx | 3 | ||||
-rw-r--r-- | Source/CPack/cpack.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestLaunch.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestScriptHandler.cxx | 3 | ||||
-rw-r--r-- | Source/CTest/cmCTestTestHandler.cxx | 3 | ||||
-rw-r--r-- | Source/cmCTest.cxx | 3 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 8 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 3 | ||||
-rw-r--r-- | Source/cmGraphVizWriter.cxx | 3 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 3 | ||||
-rw-r--r-- | Source/cmake.cxx | 12 | ||||
-rw-r--r-- | Source/cmcmd.cxx | 4 |
12 files changed, 31 insertions, 20 deletions
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx index bf4df60..68509a5 100644 --- a/Source/CPack/cmCPackGenerator.cxx +++ b/Source/CPack/cmCPackGenerator.cxx @@ -716,7 +716,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects( cm.AddCMakePaths(); cm.SetProgressCallback(cmCPackGeneratorProgress, this); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lg( + gg.MakeLocalGenerator(cm.GetCurrentSnapshot())); cmMakefile *mf = lg->GetMakefile(); std::string realInstallDirectory = tempInstallDirectory; if ( !installSubDirectory.empty() && installSubDirectory != "/" ) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index c2fe763..0c53d1b 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -202,7 +202,8 @@ int main (int argc, char const* const* argv) cminst.SetHomeOutputDirectory(""); cminst.GetState()->RemoveUnscriptableCommands(); cmGlobalGenerator cmgg(&cminst); - cmsys::auto_ptr<cmLocalGenerator> cmlg(cmgg.MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> cmlg( + cmgg.MakeLocalGenerator(cminst.GetCurrentSnapshot())); cmMakefile* globalMF = cmlg->GetMakefile(); #if defined(__CYGWIN__) globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0"); diff --git a/Source/CTest/cmCTestLaunch.cxx b/Source/CTest/cmCTestLaunch.cxx index 0f588c5..d978568 100644 --- a/Source/CTest/cmCTestLaunch.cxx +++ b/Source/CTest/cmCTestLaunch.cxx @@ -738,7 +738,8 @@ void cmCTestLaunch::LoadConfig() cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lg( + gg.MakeLocalGenerator(cm.GetCurrentSnapshot())); cmMakefile* mf = lg->GetMakefile(); std::string fname = this->LogDir; fname += "CTestLaunchConfig.cmake"; diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx index 047bd98..c791302 100644 --- a/Source/CTest/cmCTestScriptHandler.cxx +++ b/Source/CTest/cmCTestScriptHandler.cxx @@ -341,7 +341,8 @@ void cmCTestScriptHandler::CreateCMake() this->CMake->AddCMakePaths(); this->GlobalGenerator = new cmGlobalGenerator(this->CMake); - this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator(); + cmState::Snapshot snapshot = this->CMake->GetCurrentSnapshot(); + this->LocalGenerator = this->GlobalGenerator->MakeLocalGenerator(snapshot); this->Makefile = this->LocalGenerator->GetMakefile(); this->CMake->SetProgressCallback(ctestScriptProgressCallback, this->CTest); diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx index c8a0d27..3262efd 100644 --- a/Source/CTest/cmCTestTestHandler.cxx +++ b/Source/CTest/cmCTestTestHandler.cxx @@ -1592,7 +1592,8 @@ void cmCTestTestHandler::GetListOfTests() cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lg( + gg.MakeLocalGenerator(cm.GetCurrentSnapshot())); cmMakefile *mf = lg->GetMakefile(); mf->AddDefinition("CTEST_CONFIGURATION_TYPE", this->CTest->GetConfigType().c_str()); diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index b976469..f020f9e 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -520,7 +520,8 @@ int cmCTest::Initialize(const char* binary_dir, cmCTestStartCommand* command) cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lg( + gg.MakeLocalGenerator(cm.GetCurrentSnapshot())); cmMakefile *mf = lg->GetMakefile(); if ( !this->ReadCustomConfigurationFileTree(this->BinaryDir.c_str(), mf) ) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 01f50ed..251fa52 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1128,7 +1128,8 @@ void cmGlobalGenerator::Configure() this->ClearGeneratorMembers(); // start with this directory - cmLocalGenerator *lg = this->MakeLocalGenerator(); + cmLocalGenerator *lg = this->MakeLocalGenerator( + this->GetCMakeInstance()->GetCurrentSnapshot()); this->Makefiles.push_back(lg->GetMakefile()); this->LocalGenerators.push_back(lg); @@ -1988,11 +1989,6 @@ void cmGlobalGenerator::EnableInstallTarget() cmLocalGenerator * cmGlobalGenerator::MakeLocalGenerator(cmState::Snapshot snapshot) { - if (!snapshot.IsValid()) - { - snapshot = this->CMakeInstance->GetCurrentSnapshot(); - } - return this->CreateLocalGenerator(snapshot); } diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 0f491aa..c396af4 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -585,8 +585,9 @@ void cmGlobalUnixMakefileGenerator3 } else { + cmState::Snapshot snapshot = this->CMakeInstance->GetCurrentSnapshot(); lg = static_cast<cmLocalUnixMakefileGenerator3 *> - (this->MakeLocalGenerator()); + (this->MakeLocalGenerator(snapshot)); // set the Start directories lg->GetMakefile()->SetCurrentSourceDirectory (this->CMakeInstance->GetHomeDirectory()); diff --git a/Source/cmGraphVizWriter.cxx b/Source/cmGraphVizWriter.cxx index fa29b4f..797b198 100644 --- a/Source/cmGraphVizWriter.cxx +++ b/Source/cmGraphVizWriter.cxx @@ -68,7 +68,8 @@ void cmGraphVizWriter::ReadSettings(const char* settingsFileName, cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator ggi(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg(ggi.MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lg( + ggi.MakeLocalGenerator(cm.GetCurrentSnapshot())); cmMakefile *mf = lg->GetMakefile(); const char* inFileName = settingsFileName; diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 0a4b546..c6c045a 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -1217,7 +1217,8 @@ bool cmQtAutoGenerators::Run(const std::string& targetDirectory, cm.SetHomeDirectory(targetDirectory); cmGlobalGenerator gg(&cm); - cmLocalGenerator* lg = gg.MakeLocalGenerator(); + cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); + cmLocalGenerator* lg = gg.MakeLocalGenerator(snapshot); lg->GetMakefile()->SetCurrentBinaryDirectory(targetDirectory); lg->GetMakefile()->SetCurrentSourceDirectory(targetDirectory); gg.SetCurrentMakefile(lg->GetMakefile()); diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 1f5c4d4..29271b8 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -429,7 +429,8 @@ void cmake::ReadListFile(const std::vector<std::string>& args, std::string homeOutputDir = this->GetHomeOutputDirectory(); this->SetHomeDirectory(cmSystemTools::GetCurrentWorkingDirectory()); this->SetHomeOutputDirectory(cmSystemTools::GetCurrentWorkingDirectory()); - cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator()); + cmState::Snapshot snapshot = this->GetCurrentSnapshot(); + cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator(snapshot)); lg->GetMakefile()->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); lg->GetMakefile()->SetCurrentSourceDirectory @@ -469,8 +470,9 @@ bool cmake::FindPackage(const std::vector<std::string>& args) cmGlobalGenerator *gg = new cmGlobalGenerator(this); this->SetGlobalGenerator(gg); + cmState::Snapshot snapshot = this->GetCurrentSnapshot(); // read in the list file to fill the cache - cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lg(gg->MakeLocalGenerator(snapshot)); cmMakefile* mf = lg->GetMakefile(); mf->SetCurrentBinaryDirectory (cmSystemTools::GetCurrentWorkingDirectory()); @@ -2059,7 +2061,8 @@ int cmake::CheckBuildSystem() cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); cmGlobalGenerator gg(&cm); - cmsys::auto_ptr<cmLocalGenerator> lg(gg.MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lg( + gg.MakeLocalGenerator(cm.GetCurrentSnapshot())); cmMakefile* mf = lg->GetMakefile(); if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) || cmSystemTools::GetErrorOccuredFlag()) @@ -2089,7 +2092,8 @@ int cmake::CheckBuildSystem() ggd(this->CreateGlobalGenerator(genName)); if(ggd.get()) { - cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator()); + cmsys::auto_ptr<cmLocalGenerator> lgd( + ggd->MakeLocalGenerator(cm.GetCurrentSnapshot())); lgd->ClearDependencies(mf, verbose); } } diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 7bee0ea..868dbe3 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -768,7 +768,9 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string>& args) if(cmGlobalGenerator* ggd = cm.CreateGlobalGenerator(gen)) { cm.SetGlobalGenerator(ggd); - cmsys::auto_ptr<cmLocalGenerator> lgd(ggd->MakeLocalGenerator()); + cmState::Snapshot snapshot = cm.GetCurrentSnapshot(); + cmsys::auto_ptr<cmLocalGenerator> lgd( + ggd->MakeLocalGenerator(snapshot)); lgd->GetMakefile()->SetCurrentSourceDirectory(startDir); lgd->GetMakefile()->SetCurrentBinaryDirectory(startOutDir); |