diff options
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) |