cmGlobalGenerator: Create GeneratorTargets with a local generator.

This commit is contained in:
Stephen Kelly 2015-06-06 13:12:24 +02:00 committed by Brad King
parent dee197fe61
commit 8ec60c675a
3 changed files with 5 additions and 4 deletions

View File

@ -1456,9 +1456,10 @@ void cmGlobalGenerator::FinalizeTargetCompileInfo()
}
//----------------------------------------------------------------------------
void cmGlobalGenerator::CreateGeneratorTargets(cmMakefile *mf)
void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
{
cmGeneratorTargetsType generatorTargets;
cmMakefile* mf = lg->GetMakefile();
cmTargets& targets = mf->GetTargets();
for(cmTargets::iterator ti = targets.begin();
ti != targets.end(); ++ti)
@ -1487,7 +1488,7 @@ void cmGlobalGenerator::CreateGeneratorTargets()
// Construct per-target generator information.
for(unsigned int i=0; i < this->LocalGenerators.size(); ++i)
{
this->CreateGeneratorTargets(this->LocalGenerators[i]->GetMakefile());
this->CreateGeneratorTargets(this->LocalGenerators[i]);
}
}

View File

@ -483,7 +483,7 @@ private:
// Per-target generator information.
cmGeneratorTargetsType GeneratorTargets;
friend class cmake;
void CreateGeneratorTargets(cmMakefile* mf);
void CreateGeneratorTargets(cmLocalGenerator* lg);
void CreateGeneratorTargets();
void ClearGeneratorMembers();

View File

@ -483,7 +483,7 @@ bool cmake::FindPackage(const std::vector<std::string>& args)
std::string linkPath;
std::string flags;
std::string linkFlags;
gg->CreateGeneratorTargets(mf);
gg->CreateGeneratorTargets(lg.get());
cmGeneratorTarget *gtgt = gg->GetGeneratorTarget(tgt);
lg->GetTargetFlags(linkLibs, frameworkPath, linkPath, flags, linkFlags,
gtgt, false);