cmGeneratorTarget: Prefer the local generator to access the global.

This commit is contained in:
Stephen Kelly 2015-08-02 19:42:31 +02:00
parent 22590805bf
commit 32f131b0ca

View File

@ -234,7 +234,7 @@ cmGeneratorTarget::cmGeneratorTarget(cmTarget* t, cmLocalGenerator* lg)
{ {
this->Makefile = this->Target->GetMakefile(); this->Makefile = this->Target->GetMakefile();
this->LocalGenerator = lg; this->LocalGenerator = lg;
this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); this->GlobalGenerator = this->LocalGenerator->GetGlobalGenerator();
} }
cmGeneratorTarget::~cmGeneratorTarget() cmGeneratorTarget::~cmGeneratorTarget()
@ -1556,7 +1556,7 @@ cmTargetTraceDependencies
{ {
// Convenience. // Convenience.
this->Makefile = this->Target->GetMakefile(); this->Makefile = this->Target->GetMakefile();
this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); this->GlobalGenerator = target->GetLocalGenerator()->GetGlobalGenerator();
this->CurrentEntry = 0; this->CurrentEntry = 0;
// Queue all the source files already specified for the target. // Queue all the source files already specified for the target.
@ -1944,8 +1944,7 @@ void cmGeneratorTarget::GenerateTargetManifest(
{ {
return; return;
} }
cmMakefile* mf = this->Target->GetMakefile(); cmGlobalGenerator* gg = this->LocalGenerator->GetGlobalGenerator();
cmGlobalGenerator* gg = mf->GetGlobalGenerator();
// Get the names. // Get the names.
std::string name; std::string name;