cmMakefile: Move invokation to initialize snapshot.

This commit is contained in:
Stephen Kelly 2015-10-06 00:04:30 +02:00
parent 256bf8876a
commit f716460ed8
1 changed files with 3 additions and 2 deletions

View File

@ -1472,8 +1472,6 @@ void cmMakefile::AddLinkLibrary(const std::string& lib)
void cmMakefile::InitializeFromParent(cmMakefile* parent) void cmMakefile::InitializeFromParent(cmMakefile* parent)
{ {
this->StateSnapshot.InitializeFromParent();
this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR", this->AddDefinition("CMAKE_CURRENT_SOURCE_DIR",
this->GetCurrentSourceDirectory()); this->GetCurrentSourceDirectory());
this->AddDefinition("CMAKE_CURRENT_BINARY_DIR", this->AddDefinition("CMAKE_CURRENT_BINARY_DIR",
@ -1755,6 +1753,9 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
// set the subdirs start dirs // set the subdirs start dirs
subMf->SetCurrentSourceDirectory(srcPath); subMf->SetCurrentSourceDirectory(srcPath);
subMf->SetCurrentBinaryDirectory(binPath); subMf->SetCurrentBinaryDirectory(binPath);
subMf->StateSnapshot.InitializeFromParent();
if(excludeFromAll) if(excludeFromAll)
{ {
subMf->SetProperty("EXCLUDE_FROM_ALL", "TRUE"); subMf->SetProperty("EXCLUDE_FROM_ALL", "TRUE");