summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-09-13 18:36:06 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-09-24 07:39:38 (GMT)
commitc5f07e0537f2b671f271ad8ac4b6c0a529cd4beb (patch)
tree9b33daeb5de77d48df9138a2883290a9c751e4f5 /Source
parentdd408de46b45926f7dfdd27cabb4dce95708d011 (diff)
downloadCMake-c5f07e0537f2b671f271ad8ac4b6c0a529cd4beb.zip
CMake-c5f07e0537f2b671f271ad8ac4b6c0a529cd4beb.tar.gz
CMake-c5f07e0537f2b671f271ad8ac4b6c0a529cd4beb.tar.bz2
cmGlobalGenerator: Create local generators after all makefiles configured.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx15
-rw-r--r--Source/cmGlobalGenerator.h2
-rw-r--r--Source/cmMakefile.cxx5
3 files changed, 15 insertions, 7 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 7552c99..46ef2f3 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -1091,6 +1091,18 @@ void cmGlobalGenerator::ClearEnabledLanguages()
return this->CMakeInstance->GetState()->ClearEnabledLanguages();
}
+void cmGlobalGenerator::CreateLocalGenerators()
+{
+ cmDeleteAll(this->LocalGenerators);
+ this->LocalGenerators.clear();
+ this->LocalGenerators.reserve(this->Makefiles.size());
+ for (std::vector<cmMakefile*>::const_iterator it = this->Makefiles.begin();
+ it != this->Makefiles.end(); ++it)
+ {
+ this->LocalGenerators.push_back(this->CreateLocalGenerator(*it));
+ }
+}
+
void cmGlobalGenerator::Configure()
{
this->FirstTimeProgress = 0.0f;
@@ -1112,8 +1124,7 @@ void cmGlobalGenerator::Configure()
// now do it
this->ConfigureDoneCMP0026 = false;
dirMf->Configure();
- this->LocalGenerators.insert(this->LocalGenerators.begin(),
- this->CreateLocalGenerator(dirMf));
+ this->CreateLocalGenerators();
dirMf->EnforceDirectoryLevelRules();
this->ConfigureDoneCMP0026 = true;
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 40f98dc..b2dffcc 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -466,6 +466,8 @@ private:
virtual void ForceLinkerLanguages();
+ void CreateLocalGenerators();
+
void CheckCompilerIdCompatibility(cmMakefile* mf,
std::string const& lang) const;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 720a5e4..6480667 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -1772,11 +1772,6 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
{
this->UnConfiguredDirectories.push_back(subMf);
}
-
- // create a new local generator and set its parent
- cmLocalGenerator *lg2 = this->GetGlobalGenerator()
- ->CreateLocalGenerator(subMf);
- this->GetGlobalGenerator()->AddLocalGenerator(lg2);
}
void cmMakefile::SetCurrentSourceDirectory(const std::string& dir)