mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-02 12:19:54 -05:00
Xcode: Restore support for CMAKE_OSX_ARCHITECTURES=$(ARCHS_STANDARD)
Skip the `CMAKE_OSX_ARCHITECTURES` validation added by commit db409e5e68
(APPLE: Check if compilers respect CMAKE_OSX_ARCHITECTURES, 2024-05-04,
v3.30.0-rc1~15^2) if the value contains a placeholder, since we do not
know the real value.
Fixes: #26128
This commit is contained in:
@@ -99,7 +99,7 @@ function(CMAKE_DETERMINE_COMPILER_ABI lang src)
|
|||||||
# Load the resulting information strings.
|
# Load the resulting information strings.
|
||||||
if(CMAKE_${lang}_ABI_COMPILED)
|
if(CMAKE_${lang}_ABI_COMPILED)
|
||||||
message(CHECK_PASS "done")
|
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
|
file(READ_MACHO "${BIN}" ARCHITECTURES archs CAPTURE_ERROR macho_error) # undocumented file() subcommand
|
||||||
if (NOT macho_error)
|
if (NOT macho_error)
|
||||||
# sort and prune the list of found architectures
|
# 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()
|
endfunction()
|
||||||
RunClean()
|
RunClean()
|
||||||
|
|
||||||
|
run_cmake_with_options(ArchsStandard "-DCMAKE_OSX_ARCHITECTURES=$(ARCHS_STANDARD)")
|
||||||
|
|
||||||
run_cmake(ExplicitCMakeLists)
|
run_cmake(ExplicitCMakeLists)
|
||||||
run_cmake(ImplicitCMakeLists)
|
run_cmake(ImplicitCMakeLists)
|
||||||
run_cmake(InterfaceLibSources)
|
run_cmake(InterfaceLibSources)
|
||||||
|
|||||||
Reference in New Issue
Block a user