Reduce uses of cmMakefile::GetGlobalGenerator.
Don't assume the cmMakefile has a global generator.
This commit is contained in:
parent
6254ba9578
commit
00f2298f07
|
@ -12,6 +12,7 @@
|
||||||
#include "cmComputeLinkDepends.h"
|
#include "cmComputeLinkDepends.h"
|
||||||
|
|
||||||
#include "cmComputeComponentGraph.h"
|
#include "cmComputeComponentGraph.h"
|
||||||
|
#include "cmLocalGenerator.h"
|
||||||
#include "cmGlobalGenerator.h"
|
#include "cmGlobalGenerator.h"
|
||||||
#include "cmMakefile.h"
|
#include "cmMakefile.h"
|
||||||
#include "cmTarget.h"
|
#include "cmTarget.h"
|
||||||
|
@ -177,7 +178,8 @@ cmComputeLinkDepends
|
||||||
// Store context information.
|
// Store context information.
|
||||||
this->Target = target;
|
this->Target = target;
|
||||||
this->Makefile = this->Target->Target->GetMakefile();
|
this->Makefile = this->Target->Target->GetMakefile();
|
||||||
this->GlobalGenerator = this->Makefile->GetGlobalGenerator();
|
this->GlobalGenerator =
|
||||||
|
this->Target->GetLocalGenerator()->GetGlobalGenerator();
|
||||||
this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance();
|
this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance();
|
||||||
|
|
||||||
// The configuration being linked.
|
// The configuration being linked.
|
||||||
|
|
|
@ -769,7 +769,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
|
||||||
std::string lib;
|
std::string lib;
|
||||||
if(tgt)
|
if(tgt)
|
||||||
{
|
{
|
||||||
gtgt = tgt->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(tgt);
|
gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt);
|
||||||
|
|
||||||
lib = gtgt->GetFullPath(this->Config, this->UseImportLibrary);
|
lib = gtgt->GetFullPath(this->Config, this->UseImportLibrary);
|
||||||
this->AddLibraryRuntimeInfo(lib, tgt);
|
this->AddLibraryRuntimeInfo(lib, tgt);
|
||||||
|
|
|
@ -1228,7 +1228,7 @@ public:
|
||||||
: Preference(0), Target(target)
|
: Preference(0), Target(target)
|
||||||
{
|
{
|
||||||
this->Makefile = this->Target->Makefile;
|
this->Makefile = this->Target->Makefile;
|
||||||
this->GG = this->Makefile->GetGlobalGenerator();
|
this->GG = this->Target->GetLocalGenerator()->GetGlobalGenerator();
|
||||||
}
|
}
|
||||||
void Consider(const char* lang)
|
void Consider(const char* lang)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue