diff options
author | Brad King <brad.king@kitware.com> | 2018-09-06 18:21:06 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-09-07 13:23:43 (GMT) |
commit | bea390e9bd68e1aa7d86b6aef7384f502c39068c (patch) | |
tree | b19be7471586c47e8a5b1a72f433a773a62ccee8 /Source/cmComputeLinkDepends.h | |
parent | fc7e4d1ed85370d03acbd62bc753cced3550752b (diff) | |
download | CMake-bea390e9bd68e1aa7d86b6aef7384f502c39068c.zip CMake-bea390e9bd68e1aa7d86b6aef7384f502c39068c.tar.gz CMake-bea390e9bd68e1aa7d86b6aef7384f502c39068c.tar.bz2 |
Fix dependency propagation through same-name imported targets
If two imported targets in different directories have the same name we
should still be able to propagate transitive link dependencies from
both. Fix the target and link dependency analyzers to de-duplicate
targets using target pointers rather than target names since the
pointers will not be duplicated even if the names are.
Issue: #18345
Diffstat (limited to 'Source/cmComputeLinkDepends.h')
-rw-r--r-- | Source/cmComputeLinkDepends.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmComputeLinkDepends.h b/Source/cmComputeLinkDepends.h index fb3a02f..66fb1e6 100644 --- a/Source/cmComputeLinkDepends.h +++ b/Source/cmComputeLinkDepends.h @@ -72,8 +72,8 @@ private: std::string Config; EntryVector FinalLinkEntries; - std::map<std::string, int>::iterator AllocateLinkEntry( - std::string const& item); + std::map<cmLinkItem, int>::iterator AllocateLinkEntry( + cmLinkItem const& item); int AddLinkEntry(cmLinkItem const& item); void AddVarLinkEntries(int depender_index, const char* value); void AddDirectLinkEntries(); @@ -83,7 +83,7 @@ private: // One entry for each unique item. std::vector<LinkEntry> EntryList; - std::map<std::string, int> LinkEntryIndex; + std::map<cmLinkItem, int> LinkEntryIndex; // BFS of initial dependencies. struct BFSEntry |