2014-05-15 21:50:53 +04:00
|
|
|
include(RunCMake)
|
|
|
|
|
|
|
|
run_cmake(XcodeFileType)
|
2016-09-22 18:03:40 +03:00
|
|
|
run_cmake(XcodeAttributeLocation)
|
2015-02-11 22:48:43 +03:00
|
|
|
run_cmake(XcodeAttributeGenex)
|
|
|
|
run_cmake(XcodeAttributeGenexError)
|
2015-12-27 18:33:46 +03:00
|
|
|
run_cmake(XcodeObjectNeedsEscape)
|
2015-04-04 23:13:45 +03:00
|
|
|
run_cmake(XcodeObjectNeedsQuote)
|
2015-10-18 22:53:12 +03:00
|
|
|
run_cmake(XcodeOptimizationFlags)
|
|
|
|
run_cmake(XcodePreserveNonOptimizationFlags)
|
|
|
|
run_cmake(XcodePreserveObjcFlag)
|
2015-02-22 21:00:11 +03:00
|
|
|
if (NOT XCODE_VERSION VERSION_LESS 6)
|
|
|
|
run_cmake(XcodePlatformFrameworks)
|
|
|
|
endif()
|
2015-08-18 22:30:54 +03:00
|
|
|
|
|
|
|
# Use a single build tree for a few tests without cleaning.
|
|
|
|
|
|
|
|
if(NOT XCODE_VERSION VERSION_LESS 5)
|
2015-08-15 23:37:35 +03:00
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeInstallIOS-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
|
|
set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/ios_install")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
|
|
|
|
run_cmake(XcodeInstallIOS)
|
|
|
|
run_cmake_command(XcodeInstallIOS-install ${CMAKE_COMMAND} --build . --target install)
|
|
|
|
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
|
2015-08-18 22:30:54 +03:00
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesOSX-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
2016-07-18 19:11:44 +03:00
|
|
|
set(RunCMake_TEST_OPTIONS
|
|
|
|
"-DTEST_IOS=OFF"
|
|
|
|
"-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
|
2015-08-18 22:30:54 +03:00
|
|
|
|
|
|
|
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 .)
|
2016-07-18 19:11:44 +03:00
|
|
|
run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
|
2015-08-18 22:30:54 +03:00
|
|
|
|
|
|
|
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)
|
2016-07-18 19:11:44 +03:00
|
|
|
set(RunCMake_TEST_OPTIONS
|
|
|
|
"-DTEST_IOS=ON"
|
|
|
|
"-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
|
2015-08-18 22:30:54 +03:00
|
|
|
|
|
|
|
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 .)
|
2016-07-18 19:11:44 +03:00
|
|
|
run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
|
2015-08-18 22:30:54 +03:00
|
|
|
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
endif()
|
2015-08-15 22:01:31 +03:00
|
|
|
|
2015-10-23 23:19:43 +03:00
|
|
|
if(NOT XCODE_VERSION VERSION_LESS 7)
|
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesWatchOS-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
2016-07-18 19:11:44 +03:00
|
|
|
set(RunCMake_TEST_OPTIONS
|
|
|
|
"-DTEST_WATCHOS=ON"
|
|
|
|
"-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
|
2015-10-23 23:19:43 +03:00
|
|
|
|
|
|
|
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 .)
|
2016-07-18 19:11:44 +03:00
|
|
|
run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
|
2015-10-23 23:19:43 +03:00
|
|
|
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT XCODE_VERSION VERSION_LESS 7.1)
|
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesTvOS-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
2016-07-18 19:11:44 +03:00
|
|
|
set(RunCMake_TEST_OPTIONS
|
|
|
|
"-DTEST_TVOS=ON"
|
|
|
|
"-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
|
2015-10-23 23:19:43 +03:00
|
|
|
|
|
|
|
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 .)
|
2016-07-18 19:11:44 +03:00
|
|
|
run_cmake_command(XcodeBundles-install ${CMAKE_COMMAND} --build . --target install)
|
2015-10-23 23:19:43 +03:00
|
|
|
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
endif()
|
|
|
|
|
2015-08-15 22:01:31 +03:00
|
|
|
if(NOT XCODE_VERSION VERSION_LESS 7)
|
|
|
|
set(RunCMake_TEST_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/osx.cmake")
|
|
|
|
run_cmake(XcodeTbdStub)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
endif()
|
2015-10-08 03:09:34 +03:00
|
|
|
|
|
|
|
if(NOT XCODE_VERSION VERSION_LESS 6)
|
2016-03-14 13:27:53 +03:00
|
|
|
# XcodeIOSInstallCombined
|
2015-10-08 03:09:34 +03:00
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
|
|
set(RunCMake_TEST_OPTIONS
|
|
|
|
"-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install"
|
|
|
|
"-DCMAKE_IOS_INSTALL_COMBINED=YES")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
|
|
|
|
run_cmake(XcodeIOSInstallCombined)
|
|
|
|
run_cmake_command(XcodeIOSInstallCombined-build ${CMAKE_COMMAND} --build .)
|
|
|
|
run_cmake_command(XcodeIOSInstallCombined-install ${CMAKE_COMMAND} --build . --target install)
|
|
|
|
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
|
|
|
|
2016-03-14 13:27:53 +03:00
|
|
|
# XcodeIOSInstallCombinedPrune
|
2015-10-08 03:09:34 +03:00
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
|
|
set(RunCMake_TEST_OPTIONS
|
|
|
|
"-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install"
|
|
|
|
"-DCMAKE_IOS_INSTALL_COMBINED=YES")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
|
|
|
|
run_cmake(XcodeIOSInstallCombinedPrune)
|
|
|
|
run_cmake_command(XcodeIOSInstallCombinedPrune-build ${CMAKE_COMMAND} --build .)
|
|
|
|
run_cmake_command(XcodeIOSInstallCombinedPrune-install ${CMAKE_COMMAND} --build . --target install)
|
|
|
|
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
2016-03-14 13:27:53 +03:00
|
|
|
|
|
|
|
# XcodeIOSInstallCombinedSingleArch
|
|
|
|
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedSingleArch-build)
|
|
|
|
set(RunCMake_TEST_NO_CLEAN 1)
|
|
|
|
set(RunCMake_TEST_OPTIONS
|
|
|
|
"-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install"
|
|
|
|
"-DCMAKE_IOS_INSTALL_COMBINED=YES")
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
|
|
|
|
|
|
|
|
run_cmake(XcodeIOSInstallCombinedSingleArch)
|
|
|
|
run_cmake_command(XcodeIOSInstallCombinedSingleArch-build ${CMAKE_COMMAND} --build .)
|
|
|
|
run_cmake_command(XcodeIOSInstallCombinedSingleArch-install ${CMAKE_COMMAND} --build . --target install)
|
|
|
|
|
|
|
|
unset(RunCMake_TEST_BINARY_DIR)
|
|
|
|
unset(RunCMake_TEST_NO_CLEAN)
|
|
|
|
unset(RunCMake_TEST_OPTIONS)
|
2015-10-08 03:09:34 +03:00
|
|
|
endif()
|