diff options
author | Brad King <brad.king@kitware.com> | 2020-01-27 15:06:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-01-27 15:06:53 (GMT) |
commit | f624b44524cdb3df0e85bd70679682169c55f1e5 (patch) | |
tree | da49ecf68cb4cb23d54a3ca41e55fcc415b21532 /Tests/RunCMake | |
parent | 306328ace87376dddb2a42bf33c6338aac5d09ad (diff) | |
parent | 63c9cd2088cc1287e4d4cd858bbdb8ca88dd8313 (diff) | |
download | CMake-f624b44524cdb3df0e85bd70679682169c55f1e5.zip CMake-f624b44524cdb3df0e85bd70679682169c55f1e5.tar.gz CMake-f624b44524cdb3df0e85bd70679682169c55f1e5.tar.bz2 |
Merge topic 'fix-ninja-multi-framework-header'
63c9cd2088 Ninja Multi-Config: Fix bug with MacOS frameworks
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4279
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/Framework.cmake | 22 | ||||
-rw-r--r-- | Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake | 7 |
2 files changed, 29 insertions, 0 deletions
diff --git a/Tests/RunCMake/NinjaMultiConfig/Framework.cmake b/Tests/RunCMake/NinjaMultiConfig/Framework.cmake new file mode 100644 index 0000000..b4c35f6 --- /dev/null +++ b/Tests/RunCMake/NinjaMultiConfig/Framework.cmake @@ -0,0 +1,22 @@ +enable_language(C) + +set(header "${CMAKE_CURRENT_BINARY_DIR}/header.h") +file(GENERATE + OUTPUT "${header}" + CONTENT "/* foo */" + CONDITION "$<CONFIG:Release>" + ) +add_library(framework SHARED "${header}" empty.c) + +set_property(TARGET framework PROPERTY FRAMEWORK ON) +set_property(TARGET framework APPEND PROPERTY PUBLIC_HEADER ${header}) + +set_target_properties(framework PROPERTIES + LIBRARY_OUTPUT_DIRECTORY "lib" + LIBRARY_OUTPUT_DIRECTORY_DEBUG "lib" + LIBRARY_OUTPUT_DIRECTORY_RELEASE "lib" + DEBUG_POSTFIX "_debug" + ) + +include(${CMAKE_CURRENT_LIST_DIR}/Common.cmake) +generate_output_files(framework) diff --git a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake index 9fd64b0..b425d0b 100644 --- a/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake +++ b/Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake @@ -142,6 +142,13 @@ run_ninja(SimpleCrossConfigs clean-all-in-release-graph build-Release.ninja clea run_cmake_build(SimpleCrossConfigs all-all-in-release-graph Release all:all) run_cmake_build(SimpleCrossConfigs all-relwithdebinfo-in-release-graph Release all:RelWithDebInfo) +set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Framework-build) +set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_MULTI_CROSS_CONFIG_ENABLE=ON") +run_cmake_configure(Framework) +unset(RunCMake_TEST_OPTIONS) +include(${RunCMake_TEST_BINARY_DIR}/target_files.cmake) +run_cmake_build(Framework framework Debug all) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CustomCommandGenerator-build) set(RunCMake_TEST_OPTIONS "-DCMAKE_NINJA_MULTI_CROSS_CONFIG_ENABLE=ON") run_cmake_configure(CustomCommandGenerator) |