CMake/Tests/RunCMake/AppleSilicon
Brad King 98e319a88f macOS: Suppress default '-arch arm64' with CMAKE_<LANG>_COMPILER_TARGET
Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we add `-arch arm64` by
default on Apple Silicon hosts if `CMAKE_OSX_ARCHITECTURES` is not set.
This is necessary to prevent the toolchain from selecting its own
default architecture based on that of the build tool (e.g., `x86_64`).

If `CMAKE_<LANG>_COMPILER_TARGET` is set, its `-target` flag tells the
compiler what architecture to use, so do not add `-arch arm64`.

Fixes: #24599
2023-03-15 10:50:26 -04:00
..
arm64-common.cmake
arm64-env.cmake
arm64-var.cmake
arm64.c
CMakeLists.txt
default-target-arm64-build-check.cmake
default-target-arm64.cmake
default-target-x86_64-build-check.cmake
default-target-x86_64.cmake
default.c
default.cmake
RunCMakeTest.cmake
x86_64-common.cmake
x86_64-env.cmake
x86_64-var.cmake
x86_64.c