summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-08-02 17:35:48 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-08-06 22:51:40 (GMT)
commit27252b2414f5034b16a447273e1f249fdf317b72 (patch)
tree6b4b95e55da74263e86b566b7663ef3b92452005 /Source/cmComputeLinkInformation.cxx
parent22590805bffe74c3b4998152556561a2c2b6d177 (diff)
downloadCMake-27252b2414f5034b16a447273e1f249fdf317b72.zip
CMake-27252b2414f5034b16a447273e1f249fdf317b72.tar.gz
CMake-27252b2414f5034b16a447273e1f249fdf317b72.tar.bz2
cmComputeLinkInformation: Simplify generator object access.
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx18
1 files changed, 7 insertions, 11 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index c3f36af..c16472e 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -14,6 +14,7 @@
#include "cmComputeLinkDepends.h"
#include "cmOrderDirectories.h"
+#include "cmLocalGenerator.h"
#include "cmGlobalGenerator.h"
#include "cmState.h"
#include "cmOutputConverter.h"
@@ -248,7 +249,8 @@ cmComputeLinkInformation
// 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();
// Check whether to recognize OpenBSD-style library versioned names.
@@ -540,9 +542,7 @@ bool cmComputeLinkInformation::Compute()
i != wrongItems.end(); ++i)
{
cmTarget const* tgt = *i;
- cmGeneratorTarget *gtgt = tgt->GetMakefile()
- ->GetGlobalGenerator()
- ->GetGeneratorTarget(tgt);
+ cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt);
bool implib =
(this->UseImportLibrary &&
(tgt->GetType() == cmTarget::SHARED_LIBRARY));
@@ -646,9 +646,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
if(tgt && tgt->IsLinkable())
{
- cmGeneratorTarget *gtgt = tgt->GetMakefile()
- ->GetGlobalGenerator()
- ->GetGeneratorTarget(tgt);
+ cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt);
// This is a CMake target. Ask the target for its real name.
if(impexe && this->LoaderFlag)
{
@@ -762,7 +760,7 @@ void cmComputeLinkInformation::AddSharedDepItem(std::string const& item,
return;
}
- cmGeneratorTarget *gtgt = 0;
+ cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(tgt);
// Get a full path to the dependent shared library.
// Add it to the runtime path computation so that the target being
@@ -1812,9 +1810,7 @@ cmComputeLinkInformation::AddLibraryRuntimeInfo(std::string const& fullPath,
// Try to get the soname of the library. Only files with this name
// could possibly conflict.
- cmGeneratorTarget *gtgt = target->GetMakefile()
- ->GetGlobalGenerator()
- ->GetGeneratorTarget(target);
+ cmGeneratorTarget *gtgt = this->GlobalGenerator->GetGeneratorTarget(target);
std::string soName = gtgt->GetSOName(this->Config);
const char* soname = soName.empty()? 0 : soName.c_str();