Commit a3b210fd authored by Stephen Kelly's avatar Stephen Kelly Committed by Brad King

cmGeneratorTarget: Require a cmLocalGenerator to construct.

parent 8ec60c67
......@@ -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();
}
......
......@@ -24,7 +24,7 @@ class cmTarget;
class cmGeneratorTarget
{
public:
cmGeneratorTarget(cmTarget*);
cmGeneratorTarget(cmTarget*, cmLocalGenerator* lg);
cmLocalGenerator* GetLocalGenerator() const;
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment