summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-16 14:10:18 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-23 13:17:07 (GMT)
commita272344228174958a8b2346793d3272eb432dad8 (patch)
treef780c36052e86269948024d64f3d368a3570ad2d /Source/cmGeneratorTarget.cxx
parent069d60fe039ae1d797a26786f3cd4c23afc27b07 (diff)
downloadCMake-a272344228174958a8b2346793d3272eb432dad8.zip
CMake-a272344228174958a8b2346793d3272eb432dad8.tar.gz
CMake-a272344228174958a8b2346793d3272eb432dad8.tar.bz2
Fix scope of transitive target name lookups
In cmTarget, cmGeneratorTarget, and cmGeneratorExpressionEvaluator, fix target name lookups to occur in the cmMakefile context of the target that referenced the name, not the current 'head' target. The context matters for imported targets because they are directory-scoped instead of globally unique. We already do this in cmComputeLinkDepends and cmComputeTargetDepends. Extend the InterfaceLibrary test with an example covering this behavior.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 392b377..36c5648 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -478,7 +478,7 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
for(std::vector<std::string>::const_iterator li = impl->Libraries.begin();
li != impl->Libraries.end(); ++li)
{
- cmTarget const* tgt = this->Makefile->FindTargetToUse(*li);
+ cmTarget const* tgt = this->Target->FindTargetToLink(*li);
if (!tgt)
{
continue;