diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-08-25 20:55:11 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-08-25 21:06:33 (GMT) |
commit | 00f2298f0788404cf170ed6ab50b73ef890b4302 (patch) | |
tree | 718ebb79186b8c174b005de0ee26c95fca4b3af2 /Source | |
parent | 6254ba95784ae29616b17ad8b42d4f31560c2c65 (diff) | |
download | CMake-00f2298f0788404cf170ed6ab50b73ef890b4302.zip CMake-00f2298f0788404cf170ed6ab50b73ef890b4302.tar.gz CMake-00f2298f0788404cf170ed6ab50b73ef890b4302.tar.bz2 |
Reduce uses of cmMakefile::GetGlobalGenerator.
Don't assume the cmMakefile has a global generator.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 4 | ||||
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 2 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 59590fd..1e02ae4 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -12,6 +12,7 @@ #include "cmComputeLinkDepends.h" #include "cmComputeComponentGraph.h" +#include "cmLocalGenerator.h" #include "cmGlobalGenerator.h" #include "cmMakefile.h" #include "cmTarget.h" @@ -177,7 +178,8 @@ cmComputeLinkDepends // Store context information. this->Target = target; this->Makefile = this->Target->Target->GetMakefile(); - this->GlobalGenerator = this->Makefile->GetGlobalGenerator(); + this->GlobalGenerator = + this->Target->GetLocalGenerator()->GetGlobalGenerator(); this->CMakeInstance = this->GlobalGenerator->GetCMakeInstance(); // The configuration being linked. diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 6ba0eed..6c3822f 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -769,7 +769,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item, std::string lib; if(tgt) { - gtgt = tgt->GetMakefile()->GetGlobalGenerator()->GetGeneratorTarget(tgt); + gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt); lib = gtgt->GetFullPath(this->Config, this->UseImportLibrary); this->AddLibraryRuntimeInfo(lib, tgt); diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index ffdb54f..25fc8a7 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1228,7 +1228,7 @@ public: : Preference(0), Target(target) { this->Makefile = this->Target->Makefile; - this->GG = this->Makefile->GetGlobalGenerator(); + this->GG = this->Target->GetLocalGenerator()->GetGlobalGenerator(); } void Consider(const char* lang) { |