diff options
author | Brad King <brad.king@kitware.com> | 2019-05-23 12:52:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-05-23 12:57:36 (GMT) |
commit | cbd1c5b4ab16fa3e1086417f010e7bbad42cc50d (patch) | |
tree | 05336f9f3d4239bfea61613fb06a1abb794cf1d2 /Tests/RunCMake | |
parent | 79c6a573f4c6690914511e4e1894221a94f1b3e3 (diff) | |
parent | 26ea022c3bf081d9e1f7266e5ae52719cb59301b (diff) | |
download | CMake-cbd1c5b4ab16fa3e1086417f010e7bbad42cc50d.zip CMake-cbd1c5b4ab16fa3e1086417f010e7bbad42cc50d.tar.gz CMake-cbd1c5b4ab16fa3e1086417f010e7bbad42cc50d.tar.bz2 |
Merge topic 'framework-var'
26ea022c3b Add variable CMAKE_FRAMEWORK
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3347
Diffstat (limited to 'Tests/RunCMake')
-rw-r--r-- | Tests/RunCMake/Framework/FrameworkLayout.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/Framework/RunCMakeTest.cmake | 18 |
2 files changed, 17 insertions, 6 deletions
diff --git a/Tests/RunCMake/Framework/FrameworkLayout.cmake b/Tests/RunCMake/Framework/FrameworkLayout.cmake index 4f42459..84012aa 100644 --- a/Tests/RunCMake/Framework/FrameworkLayout.cmake +++ b/Tests/RunCMake/Framework/FrameworkLayout.cmake @@ -11,8 +11,11 @@ add_library(Framework ${FRAMEWORK_TYPE} flatresource.txt deepresource.txt some.txt) +if("${CMAKE_FRAMEWORK}" STREQUAL "") + set_target_properties(Framework PROPERTIES + FRAMEWORK TRUE) +endif() set_target_properties(Framework PROPERTIES - FRAMEWORK TRUE PUBLIC_HEADER foo.h RESOURCE "res.txt") set_source_files_properties(flatresource.txt PROPERTIES MACOSX_PACKAGE_LOCATION Resources) diff --git a/Tests/RunCMake/Framework/RunCMakeTest.cmake b/Tests/RunCMake/Framework/RunCMakeTest.cmake index e705a31..c7e1319 100644 --- a/Tests/RunCMake/Framework/RunCMakeTest.cmake +++ b/Tests/RunCMake/Framework/RunCMakeTest.cmake @@ -20,11 +20,14 @@ framework_layout_test(iOSFrameworkLayout-build ios STATIC) framework_layout_test(OSXFrameworkLayout-build osx SHARED) framework_layout_test(OSXFrameworkLayout-build osx STATIC) -function(framework_type_test Toolchain Type) +function(framework_type_test Toolchain Type UseProperty) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${Toolchain}${Type}FrameworkType-build) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/${Toolchain}.cmake") list(APPEND RunCMake_TEST_OPTIONS "-DFRAMEWORK_TYPE=${Type}") + if(NOT ${UseProperty}) + list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_FRAMEWORK=YES") + endif() file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") @@ -33,7 +36,12 @@ function(framework_type_test Toolchain Type) run_cmake_command(FrameworkType${Type}-build ${CMAKE_COMMAND} --build .) endfunction() -framework_type_test(ios SHARED) -framework_type_test(ios STATIC) -framework_type_test(osx SHARED) -framework_type_test(osx STATIC) +framework_type_test(ios SHARED NO) +framework_type_test(ios STATIC NO) +framework_type_test(osx SHARED NO) +framework_type_test(osx STATIC NO) + +framework_type_test(ios SHARED YES) +framework_type_test(ios STATIC YES) +framework_type_test(osx SHARED YES) +framework_type_test(osx STATIC YES) |