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