diff options
author | Brad King <brad.king@kitware.com> | 2014-06-16 15:49:10 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-06-23 13:22:07 (GMT) |
commit | d912220eaaa92f3e8524c33e1684ebbf84eba521 (patch) | |
tree | 51af981b604913add31a561a4dd3ac643ba0c832 /Source/cmTarget.h | |
parent | edce43514d854a84d2a00c975268f898bd1dda45 (diff) | |
download | CMake-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/cmTarget.h')
-rw-r--r-- | Source/cmTarget.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h index c56fa98..2e0df42 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -259,10 +259,10 @@ public: std::vector<std::string> Languages; // Libraries listed in the interface. - std::vector<std::string> Libraries; + std::vector<cmLinkItem> Libraries; // Shared library dependencies needed for linking on some platforms. - std::vector<std::string> SharedDeps; + std::vector<cmLinkItem> SharedDeps; // Number of repetitions of a strongly connected component of two // or more static libraries. @@ -270,7 +270,7 @@ public: // Libraries listed for other configurations. // Needed only for OLD behavior of CMP0003. - std::vector<std::string> WrongConfigLibraries; + std::vector<cmLinkItem> WrongConfigLibraries; bool ImplementationIsInterface; @@ -297,11 +297,11 @@ public: std::vector<std::string> Languages; // Libraries linked directly in this configuration. - std::vector<std::string> Libraries; + std::vector<cmLinkItem> Libraries; // Libraries linked directly in other configurations. // Needed only for OLD behavior of CMP0003. - std::vector<std::string> WrongConfigLibraries; + std::vector<cmLinkItem> WrongConfigLibraries; }; LinkImplementation const* GetLinkImplementation(const std::string& config) const; @@ -782,7 +782,9 @@ private: void ExpandLinkItems(std::string const& prop, std::string const& value, std::string const& config, cmTarget const* headTarget, - std::vector<std::string>& libs) const; + std::vector<cmLinkItem>& items) const; + void LookupLinkItems(std::vector<std::string> const& names, + std::vector<cmLinkItem>& items) const; std::string ProcessSourceItemCMP0049(const std::string& s); |