summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-16 18:25:40 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-25 13:32:38 (GMT)
commitb030a7f1ca89620ad4b51569c991a7c0b8aa05c2 (patch)
treead3a265b85b473a4eec78f56b3067e8b02efa366 /Source/cmTarget.cxx
parent1001490df27f3ab93f8a37a6f6c3b33aa26d22e2 (diff)
downloadCMake-b030a7f1ca89620ad4b51569c991a7c0b8aa05c2.zip
CMake-b030a7f1ca89620ad4b51569c991a7c0b8aa05c2.tar.gz
CMake-b030a7f1ca89620ad4b51569c991a7c0b8aa05c2.tar.bz2
cmTarget: De-duplicate link interface genex code for $<LINK_ONLY>
Simplify the implementation of GetTransitivePropertyTargets by using ExpandLinkItems with usage_requirements_only==true to evaluate the generator expressions in the link interface for us.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx20
1 files changed, 6 insertions, 14 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 32948cd..c4fd924 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6235,24 +6235,16 @@ void cmTarget::GetTransitivePropertyTargets(const std::string& config,
}
// The interface libraries have been explicitly set.
- cmGeneratorExpression ge;
- cmGeneratorExpressionDAGChecker dagChecker(this->GetName(),
- linkIfaceProp, 0, 0);
- dagChecker.SetTransitivePropertiesOnly();
- std::vector<std::string> libs;
- cmSystemTools::ExpandListArgument(ge.Parse(interfaceLibs)->Evaluate(
- this->Makefile,
- config,
- false,
- headTarget,
- this, &dagChecker), libs);
+ std::vector<cmLinkItem> libs;
+ this->ExpandLinkItems(linkIfaceProp, interfaceLibs, config,
+ headTarget, true, libs);
- for(std::vector<std::string>::const_iterator it = libs.begin();
+ for(std::vector<cmLinkItem>::const_iterator it = libs.begin();
it != libs.end(); ++it)
{
- if (cmTarget const* tgt = this->FindTargetToLink(*it))
+ if (it->Target)
{
- tgts.push_back(tgt);
+ tgts.push_back(it->Target);
}
}
}