diff options
author | Gregor Jasny <gjasny@googlemail.com> | 2015-08-18 19:30:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-08-24 13:50:20 (GMT) |
commit | 744e6c497c01cb3a3129ca66d1cabfa83e17dbd4 (patch) | |
tree | 06c08c6e6772c19bbaaaf20f4bb460adef1d8d6e /Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | |
parent | a712575da1a0e6117c4682100e3b9df72b964b2a (diff) | |
download | CMake-744e6c497c01cb3a3129ca66d1cabfa83e17dbd4.zip CMake-744e6c497c01cb3a3129ca66d1cabfa83e17dbd4.tar.gz CMake-744e6c497c01cb3a3129ca66d1cabfa83e17dbd4.tar.bz2 |
Fix iOS Bundle layouts (#15669)
In contrast to Mac OS X App bundle layout the iOS one lacks the
Contents/MacOSX structure. See also the Bundle Structures documentation
in Mac Developer Library:
https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html
For now detect iOS targets by checking the SDK name/path.
Diffstat (limited to 'Tests/RunCMake/XcodeProject/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index b7de614..ef81739 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -7,3 +7,35 @@ run_cmake(XcodeObjectNeedsQuote) if (NOT XCODE_VERSION VERSION_LESS 6) run_cmake(XcodePlatformFrameworks) endif() + +# Use a single build tree for a few tests without cleaning. + +if(NOT XCODE_VERSION VERSION_LESS 5) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesOSX-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS "-DTEST_IOS=OFF") + + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + run_cmake(XcodeBundles) + run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(RunCMake_TEST_OPTIONS) + + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesIOS-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS "-DTEST_IOS=ON") + + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + + run_cmake(XcodeBundles) + run_cmake_command(XcodeBundles-build ${CMAKE_COMMAND} --build .) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(RunCMake_TEST_OPTIONS) +endif() |