From 78a560e42bc475ff3fbebd8baa1f12ea0f3ea172 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sun, 8 Oct 2017 21:17:41 +0200 Subject: Revert "Xcode: Adjust tests to drop of 32bit iOS architectures" This reverts commit d210b2813072c874ee13fcc941e41aacacf09874. --- Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 2 -- Tests/RunCMake/XcodeProject/XcodeBundles.cmake | 6 +----- .../XcodeProject/XcodeIOSInstallCombined-install-check.cmake | 6 +----- Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake | 6 +----- Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake | 6 +----- 5 files changed, 4 insertions(+), 22 deletions(-) diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 554aa2f..5f4bdc3 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -129,9 +129,7 @@ if(NOT XCODE_VERSION VERSION_LESS 6) unset(RunCMake_TEST_BINARY_DIR) unset(RunCMake_TEST_NO_CLEAN) unset(RunCMake_TEST_OPTIONS) -endif() -if(XCODE_VERSION VERSION_GREATER_EQUAL 6 AND XCODE_VERSION VERSION_LESS 9) # XcodeIOSInstallCombinedPrune set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build) set(RunCMake_TEST_NO_CLEAN 1) diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake index cee71fa..0b854d8 100644 --- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake @@ -5,11 +5,7 @@ enable_language(C) if(TEST_IOS) set(CMAKE_OSX_SYSROOT iphoneos) - if(XCODE_VERSION VERSION_GREATER_EQUAL 9) - set(CMAKE_OSX_ARCHITECTURES "arm64") - else() - set(CMAKE_OSX_ARCHITECTURES "armv7") - endif() + set(CMAKE_OSX_ARCHITECTURES "armv7") set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") endif(TEST_IOS) diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake index cd71205..a1c0671 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake @@ -13,11 +13,7 @@ function(verify_architectures file) string(REPLACE "architecture " "" actual "${architectures}") list(SORT actual) - if(XCODE_VERSION VERSION_GREATER_EQUAL 9) - set(expected arm64 x86_64) - else() - set(expected arm64 armv7 i386 x86_64) - endif() + set(expected arm64 armv7 i386 x86_64) if(NOT actual STREQUAL expected) message(SEND_ERROR diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake index 6abba49..fc830b1 100644 --- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake @@ -7,11 +7,7 @@ set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") -if(XCODE_VERSION VERSION_GREATER_EQUAL 9) - set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64") -else() - set(CMAKE_OSX_ARCHITECTURES "armv7;arm64;i386;x86_64") -endif() +set(CMAKE_OSX_ARCHITECTURES "armv7;arm64;i386;x86_64") add_executable(foo_app MACOSX_BUNDLE main.cpp) install(TARGETS foo_app BUNDLE DESTINATION bin) diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake index f629f2e..a797410 100644 --- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake +++ b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake @@ -6,11 +6,7 @@ set(CMAKE_OSX_SYSROOT iphoneos) set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO") -if(XCODE_VERSION VERSION_GREATER_EQUAL 9) - set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64") -else() - set(CMAKE_OSX_ARCHITECTURES "armv7;i386") -endif() +set(CMAKE_OSX_ARCHITECTURES "armv7;i386") add_library(foo STATIC foo.cpp) install(TARGETS foo ARCHIVE DESTINATION lib) -- cgit v0.12 From 3a49b4eb78a123e1b809ed57dd888d362aac2cb2 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sun, 8 Oct 2017 22:24:13 +0200 Subject: Xcode 9: Lower iOS deployment version to get armv7 builds --- Tests/RunCMake/XcodeProject/RunCMakeTest.cmake | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake index 5f4bdc3..7d436b6 100644 --- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -1,5 +1,9 @@ include(RunCMake) +if(XCODE_VERSION VERSION_GREATER_EQUAL 9) + set(IOS_DEPLOYMENT_TARGET "-DCMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET=10") +endif() + run_cmake(XcodeFileType) run_cmake(XcodeAttributeLocation) run_cmake(XcodeAttributeGenex) @@ -20,7 +24,9 @@ run_cmake(PerConfigPerSourceFlags) if(NOT XCODE_VERSION VERSION_LESS 5) 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") + set(RunCMake_TEST_OPTIONS + "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/ios_install" + "${IOS_DEPLOYMENT_TARGET}") file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") @@ -53,7 +59,8 @@ if(NOT XCODE_VERSION VERSION_LESS 5) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS "-DTEST_IOS=ON" - "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install") + "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install" + "${IOS_DEPLOYMENT_TARGET}") file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") @@ -117,7 +124,8 @@ if(NOT XCODE_VERSION VERSION_LESS 6) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install" - "-DCMAKE_IOS_INSTALL_COMBINED=YES") + "-DCMAKE_IOS_INSTALL_COMBINED=YES" + "${IOS_DEPLOYMENT_TARGET}") file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") @@ -135,7 +143,8 @@ if(NOT XCODE_VERSION VERSION_LESS 6) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install" - "-DCMAKE_IOS_INSTALL_COMBINED=YES") + "-DCMAKE_IOS_INSTALL_COMBINED=YES" + "${IOS_DEPLOYMENT_TARGET}") file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") @@ -153,7 +162,8 @@ if(NOT XCODE_VERSION VERSION_LESS 6) set(RunCMake_TEST_NO_CLEAN 1) set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install" - "-DCMAKE_IOS_INSTALL_COMBINED=YES") + "-DCMAKE_IOS_INSTALL_COMBINED=YES" + "${IOS_DEPLOYMENT_TARGET}") file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") @@ -170,6 +180,7 @@ endif() if(NOT XCODE_VERSION VERSION_LESS 5) set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeMultiplatform-build) set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS "${IOS_DEPLOYMENT_TARGET}") file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") -- cgit v0.12