diff options
author | Ross Kilgariff <ross@ninjakiwi.com> | 2023-01-25 19:37:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-01-25 20:15:03 (GMT) |
commit | 01c1d81527aec261445fa533d5f92ca473f77160 (patch) | |
tree | 7368616a49310767abfd634ee749a8e55239ad0d /Tests/RunCMake/XcodeProject/InheritedParameters.cmake | |
parent | 950effe434623b50a1c85e2c53ed592210e79ceb (diff) | |
download | CMake-01c1d81527aec261445fa533d5f92ca473f77160.zip CMake-01c1d81527aec261445fa533d5f92ca473f77160.tar.gz CMake-01c1d81527aec261445fa533d5f92ca473f77160.tar.bz2 |
Xcode: Inherit Swift flags and compilation conditions
Extend the change from commit dfaf55fbfd (Xcode: add extra
'$(inherited)' entries using InheritBuildSettingAttribute, 2021-05-03,
v3.21.0-rc1~182^2) to cover Swift flags and compilation conditions,
allowing CocoaPods and CMake to interoperate when used in the same
project.
Diffstat (limited to 'Tests/RunCMake/XcodeProject/InheritedParameters.cmake')
-rw-r--r-- | Tests/RunCMake/XcodeProject/InheritedParameters.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/InheritedParameters.cmake b/Tests/RunCMake/XcodeProject/InheritedParameters.cmake index 5b8ec71..e2cc2a7 100644 --- a/Tests/RunCMake/XcodeProject/InheritedParameters.cmake +++ b/Tests/RunCMake/XcodeProject/InheritedParameters.cmake @@ -1,4 +1,9 @@ enable_language(C) +if(CMake_TEST_Swift) + enable_language(Swift) + string(APPEND CMAKE_Swift_FLAGS " -DSWIFTFLAG") + add_executable(swift_inherit_test dummy_main.swift) +endif() add_compile_definitions(TEST_INHERITTEST) string(APPEND CMAKE_C_FLAGS " -DTESTFLAG=\\\"TEST_INHERITTEST\\\"") |