Files
CMake/Tests/RunCMake/XcodeProject/InheritedParameters.cmake
Ross Kilgariff 01c1d81527 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.
2023-01-25 15:15:03 -05:00

14 lines
389 B
CMake

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\\\"")
add_executable(inherit_test main.c)
target_link_libraries(inherit_test PRIVATE "TEST_INHERITTEST")