diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2016-03-14 10:27:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-15 14:09:50 (GMT) |
commit | e3fc2899c89fb075a695d6140eaadf11db85d96c (patch) | |
tree | 666271bba05c80f525df422bcf63ef7394bb273d /Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | |
parent | b369959eb55dbea601315530185cb480c922cc77 (diff) | |
download | CMake-e3fc2899c89fb075a695d6140eaadf11db85d96c.zip CMake-e3fc2899c89fb075a695d6140eaadf11db85d96c.tar.gz CMake-e3fc2899c89fb075a695d6140eaadf11db85d96c.tar.bz2 |
Fix iOS combined feature for single architecture targets
If list of valid target architectures is empty for given SDK then there will
be no VALID_ARCHS build setting returned by Xcode. Return "" (empty string)
explicitly in this case. This may happens if CMAKE_IOS_INSTALL_COMBINED is ON
but only one architecture used in target.
Diffstat (limited to 'Tests/RunCMake/XcodeProject/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 395c74b..b77d5d4 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -97,6 +97,7 @@ if(NOT XCODE_VERSION VERSION_LESS 7) endif() if(NOT XCODE_VERSION VERSION_LESS 6) + # XcodeIOSInstallCombined set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS @@ -114,6 +115,7 @@ if(NOT XCODE_VERSION VERSION_LESS 6) unset(RunCMake_TEST_NO_CLEAN) unset(RunCMake_TEST_OPTIONS) + # XcodeIOSInstallCombinedPrune set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS @@ -130,4 +132,22 @@ if(NOT XCODE_VERSION VERSION_LESS 6) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) unset(RunCMake_TEST_OPTIONS) + + # 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) endif() |