mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06: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.
|
||||
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
|
||||
|
||||
1
Tests/RunCMake/XcodeProject/ArchsStandard-stdout.txt
Normal file
1
Tests/RunCMake/XcodeProject/ArchsStandard-stdout.txt
Normal file
@@ -0,0 +1 @@
|
||||
-- Detecting C compiler ABI info - done
|
||||
4
Tests/RunCMake/XcodeProject/ArchsStandard.cmake
Normal file
4
Tests/RunCMake/XcodeProject/ArchsStandard.cmake
Normal file
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user