diff options
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); |