diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-03 14:51:51 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-14 18:36:28 (GMT) |
commit | 76b598319ffe507870f918cdafe7ba7d43d9e195 (patch) | |
tree | c59ad1f359fadad5386de7521470966d4ea3b18c /Source/cmLocalGenerator.cxx | |
parent | 34c9ee2ed75e12c713bb49c699ac1dd882d1b8fa (diff) | |
download | CMake-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/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 2f2da20..c099a4d 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -51,6 +51,13 @@ cmLocalGenerator::cmLocalGenerator(cmGlobalGenerator* gg, if (parent) { parent->AddChild(this); + this->StateSnapshot = + this->GetState()->CreateSnapshot(parent->StateSnapshot); + } + else + { + this->StateSnapshot = + this->GetState()->CreateSnapshot(cmState::Snapshot(this->GetState())); } this->Makefile = new cmMakefile(this); @@ -573,6 +580,16 @@ void cmLocalGenerator::GenerateTargetManifest() } } +cmState* cmLocalGenerator::GetState() const +{ + return this->GlobalGenerator->GetCMakeInstance()->GetState(); +} + +cmState::Snapshot cmLocalGenerator::GetStateSnapshot() const +{ + return this->StateSnapshot; +} + void cmLocalGenerator::AddCustomCommandToCreateObject(const char* ofname, const std::string& lang, cmSourceFile& source, |