diff options
author | Brad King <brad.king@kitware.com> | 2022-11-02 20:58:21 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-11-02 21:03:21 (GMT) |
commit | cb4e6702b26ce8fbe8b295b31c96841f2b32748a (patch) | |
tree | f64b69466008a5ebd4beeff87a939ae409f45acb /Tests/SwiftOnly | |
parent | e1ccab12d7530d4a1004f488cbb5c985f2d27215 (diff) | |
download | CMake-cb4e6702b26ce8fbe8b295b31c96841f2b32748a.zip CMake-cb4e6702b26ce8fbe8b295b31c96841f2b32748a.tar.gz CMake-cb4e6702b26ce8fbe8b295b31c96841f2b32748a.tar.bz2 |
Xcode: Implement Swift include directories
Populate Xcode's `SWIFT_INCLUDE_PATHS` build setting with the
target-wide include directories.
Issue: #24116
Diffstat (limited to 'Tests/SwiftOnly')
-rw-r--r-- | Tests/SwiftOnly/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/SwiftOnly/SubA/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/SwiftOnly/SubA/SubA.swift | 0 | ||||
-rw-r--r-- | Tests/SwiftOnly/SubB/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/SwiftOnly/SubB/SubB.swift | 1 |
5 files changed, 8 insertions, 0 deletions
diff --git a/Tests/SwiftOnly/CMakeLists.txt b/Tests/SwiftOnly/CMakeLists.txt index e92e544..fa8687d 100644 --- a/Tests/SwiftOnly/CMakeLists.txt +++ b/Tests/SwiftOnly/CMakeLists.txt @@ -22,6 +22,9 @@ elseif(NOT XCODE_VERSION VERSION_LESS 8.0) set(CMAKE_Swift_LANGUAGE_VERSION 3.0) endif() +add_subdirectory(SubA) +add_subdirectory(SubB) + set(CMAKE_Swift_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/swift) add_executable(SwiftOnly main.swift) diff --git a/Tests/SwiftOnly/SubA/CMakeLists.txt b/Tests/SwiftOnly/SubA/CMakeLists.txt new file mode 100644 index 0000000..edebc16 --- /dev/null +++ b/Tests/SwiftOnly/SubA/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(SubA SubA.swift) +target_include_directories(SubA INTERFACE "$<TARGET_FILE_DIR:SubA>") diff --git a/Tests/SwiftOnly/SubA/SubA.swift b/Tests/SwiftOnly/SubA/SubA.swift new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/SwiftOnly/SubA/SubA.swift diff --git a/Tests/SwiftOnly/SubB/CMakeLists.txt b/Tests/SwiftOnly/SubB/CMakeLists.txt new file mode 100644 index 0000000..6e92927 --- /dev/null +++ b/Tests/SwiftOnly/SubB/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(SubB SubB.swift) +target_link_libraries(SubB PRIVATE SubA) diff --git a/Tests/SwiftOnly/SubB/SubB.swift b/Tests/SwiftOnly/SubB/SubB.swift new file mode 100644 index 0000000..d593c4c --- /dev/null +++ b/Tests/SwiftOnly/SubB/SubB.swift @@ -0,0 +1 @@ +import SubA |