cmGlobalGenerator: Add global targets at the end of Configure.
Rather than at the start of Generate.
This commit is contained in:
parent
57a69f9341
commit
58811998fb
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue