diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-10-13 19:48:46 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-10-13 22:16:20 (GMT) |
commit | 20b95ef8c83fbcb7705e72c85c9de18ff420562f (patch) | |
tree | 7241038f255ebe43bd6fefd8e2efd7533ae3167d /Source/cmake.cxx | |
parent | 841164cb36650574a1a7363c78e4cdf28d5d37fd (diff) | |
download | CMake-20b95ef8c83fbcb7705e72c85c9de18ff420562f.zip CMake-20b95ef8c83fbcb7705e72c85c9de18ff420562f.tar.gz CMake-20b95ef8c83fbcb7705e72c85c9de18ff420562f.tar.bz2 |
cmState: Initialize default definitions immediately.
Don't leave this as cmMakefile responsibility.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 2ecd3d1..7d499de 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -186,6 +186,7 @@ void cmake::CleanupCommandsAndMacros() { this->CurrentSnapshot = this->State->Reset(); this->State->RemoveUserDefinedCommands(); + this->CurrentSnapshot.SetDefaultDefinitions(); } // Parse the args @@ -378,6 +379,7 @@ void cmake::ReadListFile(const std::vector<std::string>& args, (cmSystemTools::GetCurrentWorkingDirectory()); snapshot.GetDirectory().SetCurrentSource (cmSystemTools::GetCurrentWorkingDirectory()); + snapshot.SetDefaultDefinitions(); cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot)); if (this->GetWorkingMode() != NORMAL_MODE) { @@ -420,6 +422,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args) snapshot.GetDirectory().SetCurrentSource (cmSystemTools::GetCurrentWorkingDirectory()); // read in the list file to fill the cache + snapshot.SetDefaultDefinitions(); cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(gg, snapshot)); cmsys::auto_ptr<cmLocalGenerator> lg(gg->CreateLocalGenerator(mf.get())); @@ -1928,6 +1931,7 @@ int cmake::CheckBuildSystem() cmake cm; cm.SetHomeDirectory(""); cm.SetHomeOutputDirectory(""); + cm.GetCurrentSnapshot().SetDefaultDefinitions(); cmGlobalGenerator gg(&cm); cmsys::auto_ptr<cmMakefile> mf(new cmMakefile(&gg, cm.GetCurrentSnapshot())); if(!mf->ReadListFile(this->CheckBuildSystemArgument.c_str()) || @@ -1958,6 +1962,7 @@ int cmake::CheckBuildSystem() ggd(this->CreateGlobalGenerator(genName)); if(ggd.get()) { + cm.GetCurrentSnapshot().SetDefaultDefinitions(); cmsys::auto_ptr<cmMakefile> mfd(new cmMakefile(ggd.get(), cm.GetCurrentSnapshot())); cmsys::auto_ptr<cmLocalGenerator> lgd( |