diff options
author | Brad King <brad.king@kitware.com> | 2018-06-18 17:39:23 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-06-18 17:44:43 (GMT) |
commit | bc5bcad45e1eaebbea0f1409f096d166cdb778d9 (patch) | |
tree | 288910094177ffd862809b3d596dbaa7521aa64d /Modules/CMakeDetermineCompilerId.cmake | |
parent | ef5e2e8a62982ebccf4883fc7a01cdb66f8ca183 (diff) | |
download | CMake-bc5bcad45e1eaebbea0f1409f096d166cdb778d9.zip CMake-bc5bcad45e1eaebbea0f1409f096d166cdb778d9.tar.gz CMake-bc5bcad45e1eaebbea0f1409f096d166cdb778d9.tar.bz2 |
Xcode: Detect architecture(s) using ARCHS instead of CURRENT_ARCH
Xcode 10 no longer populates `CURRENT_ARCH` with the current
architecture in shell scripts and instead uses `undefined_arch`.
Instead we must use `ARCHS`. It lists all architectures separated by
spaces.
Fixes: #18085
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 1628203..16dde65 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -121,7 +121,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${CMAKE_${lang}_COMPILER_ARCHITECTURE_ID}" PARENT_SCOPE) set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" PARENT_SCOPE) - set(CMAKE_${lang}_XCODE_CURRENT_ARCH "${CMAKE_${lang}_XCODE_CURRENT_ARCH}" PARENT_SCOPE) + set(CMAKE_${lang}_XCODE_ARCHS "${CMAKE_${lang}_XCODE_ARCHS}" PARENT_SCOPE) set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE) set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${CMAKE_${lang}_COMPILER_VERSION_INTERNAL}" PARENT_SCOPE) @@ -380,8 +380,10 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} endif() endif() endif() - if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "CURRENT_ARCH=([^%\r\n]+)[\r\n]") - set(CMAKE_${lang}_XCODE_CURRENT_ARCH "${CMAKE_MATCH_1}" PARENT_SCOPE) + if("${CMAKE_${lang}_COMPILER_ID_OUTPUT}" MATCHES "ARCHS=([^%\r\n]+)[\r\n]") + set(CMAKE_${lang}_XCODE_ARCHS "${CMAKE_MATCH_1}") + separate_arguments(CMAKE_${lang}_XCODE_ARCHS) + set(CMAKE_${lang}_XCODE_ARCHS "${CMAKE_${lang}_XCODE_ARCHS}" PARENT_SCOPE) endif() else() execute_process( |