cmGeneratorTarget: Require a cmLocalGenerator to construct.

This commit is contained in:
Stephen Kelly 2015-06-06 13:14:04 +02:00 committed by Brad King
parent 8ec60c675a
commit a3b210fd6c
3 changed files with 6 additions and 5 deletions

View File

@ -220,11 +220,12 @@ struct TagVisitor
};
//----------------------------------------------------------------------------
cmGeneratorTarget::cmGeneratorTarget(cmTarget* t): Target(t),
cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
: Target(t),
SourceFileFlagsConstructed(false)
{
this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = this->Makefile->GetLocalGenerator();
this->LocalGenerator = lg;
this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
}

View File

@ -24,7 +24,7 @@ class cmTarget;
class cmGeneratorTarget
{
public:
cmGeneratorTarget(cmTarget*);
cmGeneratorTarget(cmTarget*, cmLocalGenerator* lg);
cmLocalGenerator* GetLocalGenerator() const;

View File

@ -1465,7 +1465,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
ti != targets.end(); ++ti)
{
cmTarget* t = &ti->second;
cmGeneratorTarget* gt = new cmGeneratorTarget(t);
cmGeneratorTarget* gt = new cmGeneratorTarget(t, lg);
this->ComputeTargetObjectDirectory(gt);
this->GeneratorTargets[t] = gt;
generatorTargets[t] = gt;
@ -1475,7 +1475,7 @@ void cmGlobalGenerator::CreateGeneratorTargets(cmLocalGenerator *lg)
j = mf->GetOwnedImportedTargets().begin();
j != mf->GetOwnedImportedTargets().end(); ++j)
{
cmGeneratorTarget* gt = new cmGeneratorTarget(*j);
cmGeneratorTarget* gt = new cmGeneratorTarget(*j, lg);
this->GeneratorTargets[*j] = gt;
generatorTargets[*j] = gt;
}