diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-09-16 20:08:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-10-14 17:32:09 (GMT) |
commit | 488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4 (patch) | |
tree | 9d4abfce9ebe0608ade61c5dab3364d89b899508 /Source/cmGlobalGenerator.cxx | |
parent | 1583440509a148d216d6691cdaeede1aa24af95c (diff) | |
download | CMake-488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4.zip CMake-488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4.tar.gz CMake-488723f5cd9bec3f7b35b26c89ce2d92ad7d4db4.tar.bz2 |
cmMakefile: Store container of cmExportBuildFileGenerators.
Set a cmLocalGenerator on each instance at compute time. That will
soon be needed to access cmGeneratorTarget instances.
If a cmExportBuildFileGenerator is processed early during configure time as a
result of CMP0024 it must be removed from the list to process later at generate
time.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 6750611..9ac0019 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -73,7 +73,7 @@ cmGlobalGenerator::cmGlobalGenerator(cmake* cm) this->CurrentMakefile = 0; this->TryCompileOuterMakefile = 0; - this->ConfigureDoneCMP0026 = false; + this->ConfigureDoneCMP0026AndCMP0024 = false; } cmGlobalGenerator::~cmGlobalGenerator() @@ -234,6 +234,16 @@ bool cmGlobalGenerator::GenerateImportFile(const std::string &file) if (it != this->BuildExportSets.end()) { bool result = it->second->GenerateImportFile(); + + if (!this->ConfigureDoneCMP0026AndCMP0024) + { + for (std::vector<cmMakefile*>::const_iterator mit = + this->Makefiles.begin(); mit != this->Makefiles.end(); ++mit) + { + (*mit)->RemoveExportBuildFileGeneratorCMP0024(it->second); + } + } + delete it->second; it->second = 0; this->BuildExportSets.erase(it); @@ -1122,11 +1132,11 @@ void cmGlobalGenerator::Configure() this->CMakeInstance->GetHomeOutputDirectory()); // now do it - this->ConfigureDoneCMP0026 = false; + this->ConfigureDoneCMP0026AndCMP0024 = false; dirMf->Configure(); dirMf->EnforceDirectoryLevelRules(); - this->ConfigureDoneCMP0026 = true; + this->ConfigureDoneCMP0026AndCMP0024 = true; // Put a copy of each global target in every directory. cmTargets globalTargets; @@ -1226,6 +1236,20 @@ bool cmGlobalGenerator::CheckALLOW_DUPLICATE_CUSTOM_TARGETS() const return false; } +void cmGlobalGenerator::ComputeBuildFileGenerators() +{ + for (unsigned int i = 0; i < this->LocalGenerators.size(); ++i) + { + std::vector<cmExportBuildFileGenerator*> gens = + this->Makefiles[i]->GetExportBuildFileGenerators(); + for (std::vector<cmExportBuildFileGenerator*>::const_iterator it = + gens.begin(); it != gens.end(); ++it) + { + (*it)->Compute(this->LocalGenerators[i]); + } + } +} + bool cmGlobalGenerator::Compute() { // Some generators track files replaced during the Generate. @@ -1255,6 +1279,8 @@ bool cmGlobalGenerator::Compute() this->CreateQtAutoGeneratorsTargets(); #endif + this->ComputeBuildFileGenerators(); + unsigned int i; // Add generator specific helper commands |