summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-16 17:19:49 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-16 18:17:31 (GMT)
commitd233030f5bcfe2509b82433f7df6383cd301e34e (patch)
tree4f82e42bcfeb1e93c27fbc9c68975200b90507c2 /Source
parent0ebe2bbf4ae7f19b10f8374313b2bbd6fcd6c3da (diff)
downloadCMake-d233030f5bcfe2509b82433f7df6383cd301e34e.zip
CMake-d233030f5bcfe2509b82433f7df6383cd301e34e.tar.gz
CMake-d233030f5bcfe2509b82433f7df6383cd301e34e.tar.bz2
cmGeneratorTarget: Port implementation to cmGeneratorTarget.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx13
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 994fcb1..52ae310 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -5483,13 +5483,14 @@ void cmGeneratorTarget::ComputeLinkImplementationLibraries(
cmGeneratorTarget*
cmGeneratorTarget::FindTargetToLink(std::string const& name) const
{
- cmTarget const* tgt = this->Makefile->FindTargetToUse(name);
+ cmGeneratorTarget* tgt =
+ this->LocalGenerator->FindGeneratorTargetToUse(name);
// Skip targets that will not really be linked. This is probably a
// name conflict between an external library and an executable
// within the project.
if(tgt && tgt->GetType() == cmState::EXECUTABLE &&
- !tgt->IsExecutableWithExports())
+ !tgt->Target->IsExecutableWithExports())
{
tgt = 0;
}
@@ -5502,17 +5503,13 @@ cmGeneratorTarget::FindTargetToLink(std::string const& name) const
"allowed. "
"One may link only to STATIC or SHARED libraries, or to executables "
"with the ENABLE_EXPORTS property set.";
- cmake* cm = this->Makefile->GetCMakeInstance();
+ cmake* cm = this->LocalGenerator->GetCMakeInstance();
cm->IssueMessage(cmake::FATAL_ERROR, e.str(),
this->Target->GetBacktrace());
tgt = 0;
}
- if (!tgt)
- {
- return 0;
- }
- return this->GlobalGenerator->GetGeneratorTarget(tgt);
+ return tgt;
}
//----------------------------------------------------------------------------