Merge topic 'macos-check-archs' into release-3.30

74beb6dba8 Xcode: Restore support for CMAKE_OSX_ARCHITECTURES=$(ARCHS_STANDARD)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Lorenz Bucher <lorenz.bucher@gmail.com>
Merge-request: !9675
This commit is contained in:
Brad King
2024-07-22 14:19:56 +00:00
committed by Kitware Robot
4 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -99,7 +99,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
# Load the resulting information strings.
if(CMAKE_${lang}_ABI_COMPILED)
message(CHECK_PASS "done")
if(CMAKE_HOST_APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin")
if(CMAKE_HOST_APPLE AND CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_OSX_ARCHITECTURES MATCHES "\\$")
file(READ_MACHO "${BIN}" ARCHITECTURES archs CAPTURE_ERROR macho_error) # undocumented file() subcommand
if (NOT macho_error)
# sort and prune the list of found architectures
@@ -0,0 +1 @@
-- Detecting C compiler ABI info - done
@@ -0,0 +1,4 @@
if(NOT CMAKE_OSX_ARCHITECTURES STREQUAL "$(ARCHS_STANDARD)")
message(FATAL_ERROR "CMAKE_OSX_ARCHITECTURES is not $(ARCHS_STANDARD)")
endif()
enable_language(C)
@@ -9,6 +9,8 @@ function(RunClean)
endfunction()
RunClean()
run_cmake_with_options(ArchsStandard "-DCMAKE_OSX_ARCHITECTURES=$(ARCHS_STANDARD)")
run_cmake(ExplicitCMakeLists)
run_cmake(ImplicitCMakeLists)
run_cmake(InterfaceLibSources)