summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.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/cmGeneratorTarget.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/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 36c5648..fd82d17 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -475,10 +475,10 @@ bool cmGeneratorTarget::IsSystemIncludeDirectory(const std::string& dir,
}
std::set<cmTarget const*> uniqueDeps;
- for(std::vector<std::string>::const_iterator li = impl->Libraries.begin();
+ for(std::vector<cmLinkItem>::const_iterator li = impl->Libraries.begin();
li != impl->Libraries.end(); ++li)
{
- cmTarget const* tgt = this->Target->FindTargetToLink(*li);
+ cmTarget const* tgt = li->Target;
if (!tgt)
{
continue;