mirror of
https://github.com/reactos/CMake.git
synced 2024-11-24 03:59:58 +00:00
Tests: Fix RunCMake.Framework ios arch for Xcode 9
Xcode 9 comes with the iPhoneOS 11.0 SDK that does not support the `armv7` architecture. For this SDK version and newer, use `arm64`.
This commit is contained in:
parent
b8dd7a705c
commit
58d9297eef
@ -20,6 +20,16 @@ execute_process(
|
||||
OUTPUT_VARIABLE IOS_SDK_PATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${XCRUN_EXECUTABLE} --sdk iphoneos --show-sdk-version
|
||||
OUTPUT_VARIABLE IOS_SDK_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(IOS_SDK_VERSION VERSION_GREATER_EQUAL 11.0)
|
||||
set(IOS_ARCH arm64)
|
||||
else()
|
||||
set(IOS_ARCH armv7)
|
||||
endif()
|
||||
|
||||
set(CMAKE_OSX_SYSROOT ${IOS_SDK_PATH} CACHE PATH "Sysroot used for iOS support")
|
||||
set(CMAKE_OSX_ARCHITECTURES "armv7" CACHE STRING "Architectures to build for")
|
||||
set(CMAKE_OSX_ARCHITECTURES "${IOS_ARCH}" CACHE STRING "Architectures to build for")
|
||||
set(CMAKE_FIND_ROOT_PATH ${IOS_SDK_PATH} CACHE PATH "Find search path root")
|
||||
|
Loading…
Reference in New Issue
Block a user