summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-05-03 14:51:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-14 18:36:28 (GMT)
commit76b598319ffe507870f918cdafe7ba7d43d9e195 (patch)
treec59ad1f359fadad5386de7521470966d4ea3b18c /Source/cmMakefile.cxx
parent34c9ee2ed75e12c713bb49c699ac1dd882d1b8fa (diff)
downloadCMake-76b598319ffe507870f918cdafe7ba7d43d9e195.zip
CMake-76b598319ffe507870f918cdafe7ba7d43d9e195.tar.gz
CMake-76b598319ffe507870f918cdafe7ba7d43d9e195.tar.bz2
cmLocalGenerator: Initialize state before creating cmMakefile.
Access the state from the local generator in the cmMakefile.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx16
1 files changed, 1 insertions, 15 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 4ded936..1a6d123 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -153,27 +153,13 @@ public:
cmMakefile::cmMakefile(cmLocalGenerator* localGenerator)
: Internal(new Internals),
LocalGenerator(localGenerator),
- StateSnapshot(localGenerator->GetGlobalGenerator()
- ->GetCMakeInstance()->GetState())
+ StateSnapshot(localGenerator->GetStateSnapshot())
{
this->Internal->PushDefinitions();
this->Internal->VarInitStack.push(std::set<std::string>());
this->Internal->VarUsageStack.push(std::set<std::string>());
this->Internal->IsSourceFileTryCompile = false;
- if (this->LocalGenerator->GetParent())
- {
- cmMakefile* parentMf = this->LocalGenerator->GetParent()->GetMakefile();
- this->StateSnapshot =
- this->GetState()->CreateSnapshot(parentMf->StateSnapshot);
- }
- else
- {
- this->StateSnapshot =
- this->GetState()->CreateSnapshot(this->StateSnapshot);
- }
-
-
// Initialize these first since AddDefaultDefinitions calls AddDefinition
this->WarnUnused = false;
this->CheckSystemVars = false;