diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-07-25 18:42:28 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-07-27 19:57:28 (GMT) |
commit | 58811998fb63975cc92abab23044630bc11cd26d (patch) | |
tree | e9c3c59d484a8cbefa646747afd449eaee0a53ae | |
parent | 57a69f934173eceaaf87e15074baf4e19402a687 (diff) | |
download | CMake-58811998fb63975cc92abab23044630bc11cd26d.zip CMake-58811998fb63975cc92abab23044630bc11cd26d.tar.gz CMake-58811998fb63975cc92abab23044630bc11cd26d.tar.bz2 |
cmGlobalGenerator: Add global targets at the end of Configure.
Rather than at the start of Generate.
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 8550d0d..f5ddd10 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1149,6 +1149,25 @@ void cmGlobalGenerator::Configure() } this->CMakeInstance->UpdateProgress(msg.str().c_str(), -1); } + + unsigned int i; + + // Put a copy of each global target in every directory. + cmTargets globalTargets; + this->CreateDefaultGlobalTargets(&globalTargets); + + for (i = 0; i < this->LocalGenerators.size(); ++i) + { + cmMakefile* mf = this->LocalGenerators[i]->GetMakefile(); + cmTargets* targets = &(mf->GetTargets()); + cmTargets::iterator tit; + for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit ) + { + (*targets)[tit->first] = tit->second; + (*targets)[tit->first].SetMakefile(mf); + } + } + } void cmGlobalGenerator::CreateGenerationObjects() @@ -1222,23 +1241,11 @@ void cmGlobalGenerator::Generate() this->CreateQtAutoGeneratorsTargets(autogens); #endif - // For each existing cmLocalGenerator unsigned int i; - // Put a copy of each global target in every directory. - cmTargets globalTargets; - this->CreateDefaultGlobalTargets(&globalTargets); for (i = 0; i < this->LocalGenerators.size(); ++i) { this->LocalGenerators[i]->ComputeObjectMaxPath(); - cmMakefile* mf = this->LocalGenerators[i]->GetMakefile(); - cmTargets* targets = &(mf->GetTargets()); - cmTargets::iterator tit; - for ( tit = globalTargets.begin(); tit != globalTargets.end(); ++ tit ) - { - (*targets)[tit->first] = tit->second; - (*targets)[tit->first].SetMakefile(mf); - } } // Add generator specific helper commands @@ -1384,6 +1391,10 @@ void cmGlobalGenerator::CreateQtAutoGeneratorsTargets(AutogensType &autogens) for(cmTargets::iterator ti = targets.begin(); ti != targets.end(); ++ti) { + if (ti->second.GetType() == cmTarget::GLOBAL_TARGET) + { + continue; + } targetNames.push_back(ti->second.GetName()); } for(std::vector<std::string>::iterator ti = targetNames.begin(); @@ -1432,6 +1443,10 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo() ti != targets.end(); ++ti) { cmTarget* t = &ti->second; + if (t->GetType() == cmTarget::GLOBAL_TARGET) + { + continue; + } t->AppendBuildInterfaceIncludes(); |