summaryrefslogtreecommitdiffstats
path: root/Tests/ImportedSameName/A/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-09-06 18:21:06 (GMT)
committerBrad King <brad.king@kitware.com>2018-09-07 13:23:43 (GMT)
commitbea390e9bd68e1aa7d86b6aef7384f502c39068c (patch)
treeb19be7471586c47e8a5b1a72f433a773a62ccee8 /Tests/ImportedSameName/A/CMakeLists.txt
parentfc7e4d1ed85370d03acbd62bc753cced3550752b (diff)
downloadCMake-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 'Tests/ImportedSameName/A/CMakeLists.txt')
-rw-r--r--Tests/ImportedSameName/A/CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/ImportedSameName/A/CMakeLists.txt b/Tests/ImportedSameName/A/CMakeLists.txt
new file mode 100644
index 0000000..9417a2c
--- /dev/null
+++ b/Tests/ImportedSameName/A/CMakeLists.txt
@@ -0,0 +1,7 @@
+add_library(a STATIC a.c)
+
+add_library(sameName INTERFACE IMPORTED)
+target_link_libraries(sameName INTERFACE a)
+
+add_library(ifaceA INTERFACE)
+target_link_libraries(ifaceA INTERFACE sameName)