summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkDepends.h
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/cmComputeLinkDepends.h
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/cmComputeLinkDepends.h')
-rw-r--r--Source/cmComputeLinkDepends.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h
index 440dc0d..3207ecb 100644
--- a/Source/cmComputeLinkDepends.h
+++ b/Source/cmComputeLinkDepends.h
@@ -77,11 +77,11 @@ private:
std::map<std::string, int>::iterator
AllocateLinkEntry(std::string const& item);
- int AddLinkEntry(int depender_index, std::string const& item);
+ int AddLinkEntry(cmLinkItem const& item);
void AddVarLinkEntries(int depender_index, const char* value);
void AddDirectLinkEntries();
void AddLinkEntries(int depender_index,
- std::vector<std::string> const& libs);
+ std::vector<cmLinkItem> const& libs);
cmTarget const* FindTargetToLink(int depender_index,
const std::string& name);
@@ -103,7 +103,7 @@ private:
// of the interface.
struct SharedDepEntry
{
- std::string Item;
+ cmLinkItem Item;
int DependerIndex;
};
std::queue<SharedDepEntry> SharedDepQueue;
@@ -112,7 +112,7 @@ private:
cmTarget::LinkInterface const* iface,
bool follow_interface = false);
void QueueSharedDependencies(int depender_index,
- std::vector<std::string> const& deps);
+ std::vector<cmLinkItem> const& deps);
void HandleSharedDependency(SharedDepEntry const& dep);
// Dependency inferral for each link item.
@@ -163,7 +163,7 @@ private:
// Compatibility help.
bool OldLinkDirMode;
- void CheckWrongConfigItem(int depender_index, std::string const& item);
+ void CheckWrongConfigItem(cmLinkItem const& item);
std::set<cmTarget const*> OldWrongConfigItems;
};