summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-06-16 15:49:10 (GMT)
committerBrad King <brad.king@kitware.com>2014-06-23 13:22:07 (GMT)
commitd912220eaaa92f3e8524c33e1684ebbf84eba521 (patch)
tree51af981b604913add31a561a4dd3ac643ba0c832 /Source/cmGeneratorExpressionEvaluator.cxx
parentedce43514d854a84d2a00c975268f898bd1dda45 (diff)
downloadCMake-d912220eaaa92f3e8524c33e1684ebbf84eba521.zip
CMake-d912220eaaa92f3e8524c33e1684ebbf84eba521.tar.gz
CMake-d912220eaaa92f3e8524c33e1684ebbf84eba521.tar.bz2
cmTarget: Lookup targets in LinkInterface and LinkImplementation
Instead of storing just the string names in these structures, lookup any target associated with each item and store its cmTarget pointer. Use the cmLinkItem class to hold the name and pointer together. Update client sites to use the pre-stored lookup result instead of looking up the target name again. Create a cmTarget::LookupLinkItems helper method to handle the lookup. Since lookups are now moving from cmComputeLinkDepends::AddLinkEntries to cmTarget::LookupLinkItems, move use of CheckCMP0004 to the latter. This drops use of CheckCMP0004 from entries added for _LIB_DEPENDS variables by cmComputeLinkDepends::AddVarLinkEntries, but I do not think that use was intentional originally anyway.
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.cxx b/Source/cmGeneratorExpressionEvaluator.cxx
index f491882..c925869 100644
--- a/Source/cmGeneratorExpressionEvaluator.cxx
+++ b/Source/cmGeneratorExpressionEvaluator.cxx
@@ -800,7 +800,7 @@ static const char* targetPropertyTransitiveWhitelist[] = {
#undef TRANSITIVE_PROPERTY_NAME
std::string getLinkedTargetsContent(
- const std::vector<cmTarget const*> &targets,
+ std::vector<cmTarget const*> &targets,
cmTarget const* target,
cmTarget const* headTarget,
cmGeneratorExpressionContext *context,
@@ -841,7 +841,7 @@ std::string getLinkedTargetsContent(
return linkedTargetsContent;
}
-std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
+std::string getLinkedTargetsContent(std::vector<cmLinkItem> const &libraries,
cmTarget const* target,
cmTarget const* headTarget,
cmGeneratorExpressionContext *context,
@@ -849,13 +849,13 @@ std::string getLinkedTargetsContent(const std::vector<std::string> &libraries,
const std::string &interfacePropertyName)
{
std::vector<cmTarget const*> tgts;
- for (std::vector<std::string>::const_iterator
+ for (std::vector<cmLinkItem>::const_iterator
it = libraries.begin();
it != libraries.end(); ++it)
{
- if (cmTarget const *tgt = target->FindTargetToLink(*it))
+ if (it->Target)
{
- tgts.push_back(tgt);
+ tgts.push_back(it->Target);
}
}
return getLinkedTargetsContent(tgts, target, headTarget, context,