summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/NinjaMultiConfig
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2020-01-24 20:51:44 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2020-01-24 22:16:25 (GMT)
commit63c9cd2088cc1287e4d4cd858bbdb8ca88dd8313 (patch)
tree2b4632fd229f3f78037bf461ddf93160b05a0c17 /Tests/RunCMake/NinjaMultiConfig
parent072a95350ca914c12afd4f617cb45f0477883b14 (diff)
downloadCMake-63c9cd2088cc1287e4d4cd858bbdb8ca88dd8313.zip
CMake-63c9cd2088cc1287e4d4cd858bbdb8ca88dd8313.tar.gz
CMake-63c9cd2088cc1287e4d4cd858bbdb8ca88dd8313.tar.bz2
Ninja Multi-Config: Fix bug with MacOS frameworks
Diffstat (limited to 'Tests/RunCMake/NinjaMultiConfig')
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/Framework.cmake22
-rw-r--r--Tests/RunCMake/NinjaMultiConfig/RunCMakeTest.cmake7
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)