summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-20 13:55:53 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-07-20 13:56:07 (GMT)
commitbeb78ada5e51470a1d0a5180302f064b1e72af26 (patch)
tree99010eebe4096ed746ad1dd908630fa5d27b9c97
parentd66638400f3507aa747047b82e70080c219b0d48 (diff)
parent14a571244758ac6851c3a36e69f92388458c2ea0 (diff)
downloadCMake-beb78ada5e51470a1d0a5180302f064b1e72af26.zip
CMake-beb78ada5e51470a1d0a5180302f064b1e72af26.tar.gz
CMake-beb78ada5e51470a1d0a5180302f064b1e72af26.tar.bz2
Merge topic 'swift-link-iface'
14a5712447 Swift: Fix regression in linking to interface libraries Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !5027
-rw-r--r--Source/cmGeneratorTarget.cxx3
-rw-r--r--Tests/SwiftOnly/CMakeLists.txt1
2 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 72dc80b..4fe68d2 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1365,6 +1365,9 @@ void AddSwiftImplicitIncludeDirectories(
for (const cmLinkImplItem& library : libraries->Libraries) {
if (const cmGeneratorTarget* dependency = library.Target) {
+ if (dependency->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
+ continue;
+ }
if (cm::contains(dependency->GetAllConfigCompileLanguages(),
"Swift")) {
EvaluatedTargetPropertyEntry entry{ library, library.Backtrace };
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt
index e24279b..41d14ea 100644
--- a/Tests/SwiftOnly/CMakeLists.txt
+++ b/Tests/SwiftOnly/CMakeLists.txt
@@ -35,3 +35,4 @@ target_link_libraries(N PUBLIC
# Dummy to make sure generation works with such targets.
add_library(SwiftIface INTERFACE)
+target_link_libraries(SwiftOnly PRIVATE SwiftIface)