Skip to content

Xcode: Explicitly specify default native architecture on macOS

Brad King requested to merge brad.king/cmake:xcode-native-arch into master

When CMAKE_OSX_ARCHITECTURES is not specified, we add the Xcode setting ONLY_ACTIVE_ARCH = YES with the intention of targeting the native architecture of the host. However, the default ARCHS value chosen by "Xcode 12 Universal Apps" includes multiple architectures. Add an explicit ARCHS setting with value $(NATIVE_ARCH_ACTUAL) to tell Xcode to use the host's native architecture only.

Fixes: #20893 (closed)
Backport: release

Edited by Brad King

Merge request reports