summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-02 09:41:51 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-28 16:44:39 (GMT)
commitff8ac8ee6ab3ee686621445456a765fa33c1a873 (patch)
tree35e36e25e7211e74f550fd9416f37a33b34074ca /Source/cmGlobalGenerator.cxx
parent0bd7279fd9608702b7790822c80f3c284de8e7e4 (diff)
downloadCMake-ff8ac8ee6ab3ee686621445456a765fa33c1a873.zip
CMake-ff8ac8ee6ab3ee686621445456a765fa33c1a873.tar.gz
CMake-ff8ac8ee6ab3ee686621445456a765fa33c1a873.tar.bz2
cmLocalGenerator: Create from already-constructed cmMakefile.
Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index fba14e5..d82c7f3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1127,10 +1127,10 @@ void cmGlobalGenerator::Configure()
this->FirstTimeProgress = 0.0f;
this->ClearGeneratorMembers();
- // start with this directory
- cmLocalGenerator *lg = this->CreateLocalGenerator(
- this->GetCMakeInstance()->GetCurrentSnapshot());
- this->Makefiles.push_back(lg->GetMakefile());
+ cmMakefile* dirMf =
+ new cmMakefile(this, this->GetCMakeInstance()->GetCurrentSnapshot());
+ this->Makefiles.push_back(dirMf);
+ cmLocalGenerator *lg = this->CreateLocalGenerator(dirMf);
this->LocalGenerators.push_back(lg);
// set the Start directories
@@ -1601,6 +1601,7 @@ void cmGlobalGenerator::ClearGeneratorMembers()
cmDeleteAll(this->BuildExportSets);
this->BuildExportSets.clear();
+ cmDeleteAll(this->Makefiles);
this->Makefiles.clear();
cmDeleteAll(this->LocalGenerators);
@@ -1987,9 +1988,9 @@ void cmGlobalGenerator::EnableInstallTarget()
}
cmLocalGenerator*
-cmGlobalGenerator::CreateLocalGenerator(cmState::Snapshot snapshot)
+cmGlobalGenerator::CreateLocalGenerator(cmMakefile* mf)
{
- return new cmLocalGenerator(this, snapshot);
+ return new cmLocalGenerator(this, mf);
}
void cmGlobalGenerator::EnableLanguagesFromGenerator(cmGlobalGenerator *gen,