diff options
author | Brad King <brad.king@kitware.com> | 2022-07-08 13:01:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-07-08 13:02:08 (GMT) |
commit | cf043b91509a5139d6dc1b779406ff48f0790e03 (patch) | |
tree | 75e3037f44b4368636aef731e12e57b6f8f58be0 /Tests | |
parent | c4cdd7a24d3016ccf91fae26646a548b52de4a78 (diff) | |
parent | 5cb625eb2f7908d1c07e5bd2820263d97449ee79 (diff) | |
download | CMake-cf043b91509a5139d6dc1b779406ff48f0790e03.zip CMake-cf043b91509a5139d6dc1b779406ff48f0790e03.tar.gz CMake-cf043b91509a5139d6dc1b779406ff48f0790e03.tar.bz2 |
Merge topic 'xcode_swift_definitions'
5cb625eb2f Xcode: Pass compile definitions to Swift
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7388
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/SwiftOnly/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/SwiftOnly/main.swift | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt index 01c2222..e92e544 100644 --- a/Tests/SwiftOnly/CMakeLists.txt +++ b/Tests/SwiftOnly/CMakeLists.txt @@ -25,6 +25,7 @@ endif() set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift) add_executable(SwiftOnly main.swift) +target_compile_definitions(SwiftOnly PRIVATE SWIFTONLY) add_library(L L.swift) diff --git a/Tests/SwiftOnly/main.swift b/Tests/SwiftOnly/main.swift index 28560d0..a3f1a2c 100644 --- a/Tests/SwiftOnly/main.swift +++ b/Tests/SwiftOnly/main.swift @@ -1 +1,7 @@ dump("SwiftOnly") + +#if SWIFTONLY +dump("SWIFTONLY defined") +#else +fatalError("SWIFTONLY NOT defined") +#endif |