summaryrefslogtreecommitdiffstats
path: root/Tests/SwiftOnly
diff options
context:
space:
mode:
authorEvan Wilde <etceterawilde@gmail.com>2024-04-05 21:13:22 (GMT)
committerEvan Wilde <etceterawilde@gmail.com>2024-04-09 01:07:13 (GMT)
commit579472d877fb6a953d0d554e05578c17a1974612 (patch)
treec66c5e17942879af4ff3df881c74e2238c81add2 /Tests/SwiftOnly
parent5fc6d6165cafb31d43f4f5b8e94943ac1b9046b5 (diff)
downloadCMake-579472d877fb6a953d0d554e05578c17a1974612.zip
CMake-579472d877fb6a953d0d554e05578c17a1974612.tar.gz
CMake-579472d877fb6a953d0d554e05578c17a1974612.tar.bz2
Swift: Ninja: Remove module dependency for executables
We shouldn't include the swiftmodule in the ninja dependency graph unless that target emits a swiftmodule. Fixes: #25869
Diffstat (limited to 'Tests/SwiftOnly')
-rw-r--r--Tests/SwiftOnly/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt
index 2aa5710..c5a4b83 100644
--- a/Tests/SwiftOnly/CMakeLists.txt
+++ b/Tests/SwiftOnly/CMakeLists.txt
@@ -50,6 +50,9 @@ if(NOT XCODE_VERSION OR XCODE_VERSION VERSION_GREATER_EQUAL 9.0)
set_target_properties(O PROPERTIES Swift_COMPILATION_MODE "incremental")
endif()
+add_library(P L.swift)
+add_dependencies(P SwiftOnly)
+
# Dummy to make sure generation works with such targets.
add_library(SwiftIface INTERFACE)
target_link_libraries(SwiftOnly PRIVATE SwiftIface)