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/cmComputeTargetDepends.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/cmComputeTargetDepends.h')
-rw-r--r-- | Source/cmComputeTargetDepends.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmComputeTargetDepends.h b/Source/cmComputeTargetDepends.h index b99199f..902f342 100644 --- a/Source/cmComputeTargetDepends.h +++ b/Source/cmComputeTargetDepends.h @@ -20,6 +20,7 @@ class cmComputeComponentGraph; class cmGlobalGenerator; +class cmLinkItem; class cmTarget; class cmTargetDependSet; @@ -46,13 +47,13 @@ private: void CollectDepends(); void CollectTargetDepends(int depender_index); void AddTargetDepend(int depender_index, - const std::string& dependee_name, + cmLinkItem const& dependee_name, bool linking); void AddTargetDepend(int depender_index, cmTarget const* dependee, bool linking); bool ComputeFinalDepends(cmComputeComponentGraph const& ccg); void AddInterfaceDepends(int depender_index, - const std::string& dependee_name, + cmLinkItem const& dependee_name, std::set<std::string> &emitted); void AddInterfaceDepends(int depender_index, cmTarget const* dependee, const std::string& config, |