diff options
author | Brad King <brad.king@kitware.com> | 2020-07-20 13:55:53 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-07-20 13:56:06 (GMT) |
commit | 61b0d2c95c9010d57ba6e71a706f441d6b372b6e (patch) | |
tree | 288d8317ba49d100ffbb479c57c48ff8d61b502c | |
parent | 290a68b94ce43b44eb84190ec2140d1710718836 (diff) | |
parent | 14a571244758ac6851c3a36e69f92388458c2ea0 (diff) | |
download | CMake-61b0d2c95c9010d57ba6e71a706f441d6b372b6e.zip CMake-61b0d2c95c9010d57ba6e71a706f441d6b372b6e.tar.gz CMake-61b0d2c95c9010d57ba6e71a706f441d6b372b6e.tar.bz2 |
Merge topic 'swift-link-iface' into release-3.18
14a5712447 Swift: Fix regression in linking to interface libraries
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5027
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 3 | ||||
-rw-r--r-- | Tests/SwiftOnly/CMakeLists.txt | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index f2011ee..c7baf2b 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1309,6 +1309,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) |