mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-18 01:31:04 -05:00
Xcode: Default to arm64 arch on Apple Silicon hosts during compiler id
In commitb6c60f14b6(macOS: Default to arm64 architecture on Apple Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we forgot to update the compiler id architecture selection added by commit26673bf480(Xcode: Explicitly specify default native architecture on macOS, 2020-07-16, v3.18.1~20^2). Issue: #21425
This commit is contained in:
@@ -516,9 +516,16 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
|
|||||||
endif()
|
endif()
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_SYSROOT MATCHES "^$|[Mm][Aa][Cc][Oo][Ss]")
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_OSX_SYSROOT MATCHES "^$|[Mm][Aa][Cc][Oo][Ss]")
|
||||||
# When targeting macOS, use only the host architecture.
|
# When targeting macOS, use only the host architecture.
|
||||||
set(id_archs [[ARCHS = "$(NATIVE_ARCH_ACTUAL)";]])
|
if (_CMAKE_APPLE_ARCHS_DEFAULT)
|
||||||
|
set(id_archs "ARCHS = \"${_CMAKE_APPLE_ARCHS_DEFAULT}\";")
|
||||||
|
set(id_arch_active "ONLY_ACTIVE_ARCH = NO;")
|
||||||
|
else()
|
||||||
|
set(id_archs [[ARCHS = "$(NATIVE_ARCH_ACTUAL)";]])
|
||||||
|
set(id_arch_active "ONLY_ACTIVE_ARCH = YES;")
|
||||||
|
endif()
|
||||||
else()
|
else()
|
||||||
set(id_archs "")
|
set(id_archs "")
|
||||||
|
set(id_arch_active "ONLY_ACTIVE_ARCH = YES;")
|
||||||
endif()
|
endif()
|
||||||
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-3.pbxproj.in
|
configure_file(${CMAKE_ROOT}/Modules/CompilerId/Xcode-3.pbxproj.in
|
||||||
${id_dir}/CompilerId${lang}.xcodeproj/project.pbxproj @ONLY)
|
${id_dir}/CompilerId${lang}.xcodeproj/project.pbxproj @ONLY)
|
||||||
|
|||||||
@@ -80,11 +80,11 @@
|
|||||||
1DEB928A08733DD80010E9CD = {
|
1DEB928A08733DD80010E9CD = {
|
||||||
isa = XCBuildConfiguration;
|
isa = XCBuildConfiguration;
|
||||||
buildSettings = {
|
buildSettings = {
|
||||||
ONLY_ACTIVE_ARCH = YES;
|
|
||||||
CODE_SIGNING_REQUIRED = NO;
|
CODE_SIGNING_REQUIRED = NO;
|
||||||
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)";
|
||||||
SYMROOT = .;
|
SYMROOT = .;
|
||||||
@id_archs@
|
@id_archs@
|
||||||
|
@id_arch_active@
|
||||||
@id_toolset@
|
@id_toolset@
|
||||||
@id_lang_version@
|
@id_lang_version@
|
||||||
@id_clang_cxx_library@
|
@id_clang_cxx_library@
|
||||||
|
|||||||
Reference in New Issue
Block a user