diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-02 09:41:51 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-28 16:44:39 (GMT) |
commit | ff8ac8ee6ab3ee686621445456a765fa33c1a873 (patch) | |
tree | 35e36e25e7211e74f550fd9416f37a33b34074ca /Source/cmMakefile.cxx | |
parent | 0bd7279fd9608702b7790822c80f3c284de8e7e4 (diff) | |
download | CMake-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/cmMakefile.cxx')
-rw-r--r-- | Source/cmMakefile.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 1df6213..7893032 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -16,7 +16,6 @@ #include "cmSourceFileLocation.h" #include "cmSystemTools.h" #include "cmGlobalGenerator.h" -#include "cmLocalGenerator.h" #include "cmCommands.h" #include "cmState.h" #include "cmOutputConverter.h" @@ -1754,14 +1753,14 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath, this->ContextStack.back()->Name, this->ContextStack.back()->Line); + cmMakefile* subMf = new cmMakefile(this->GlobalGenerator, newSnapshot); + this->GetGlobalGenerator()->AddMakefile(subMf); + // create a new local generator and set its parent cmLocalGenerator *lg2 = this->GetGlobalGenerator() - ->CreateLocalGenerator(newSnapshot); - this->GetGlobalGenerator()->AddMakefile(lg2->GetMakefile()); + ->CreateLocalGenerator(subMf); this->GetGlobalGenerator()->AddLocalGenerator(lg2); - cmMakefile* subMf = lg2->GetMakefile(); - // set the subdirs start dirs subMf->SetCurrentSourceDirectory(srcPath); subMf->SetCurrentBinaryDirectory(binPath); |