CMake 3.30 breaks Xcode Generator when using CMAKE_OSX_ARCHITECTURES:STRING=$(ARCHS_STANDARD)
Cmake 3.30 seems to have broken my projects that build universal binaries (arm64;x86_64)
I use this to create universal binaries when building via Xcode:
if(CMAKE_GENERATOR STREQUAL "Xcode")
set(CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD) CACHE STRING "")
endif()
This leads to CMakeCache.txt having the following entry: CMAKE_OSX_ARCHITECTURES:STRING=$(ARCHS_STANDARD)
$(ARCHS_STANDARD)
is an Xcode build enviroment variable and is resolved to e.g. arm64 x86_64
Commit db409e5e from !9492 (merged) introduced a "consistency check", which now fails because (obiously) $(ARCHS_STANDARD)
is just a string literal at that point (get resolved later in Xcode).
I believe using CMAKE_OSX_ARCHITECTURES:STRING=$(ARCHS_STANDARD)
is the "standard" and cleanest way of creating universal binaries via the Xcode generator. This is now no longer possible because of the aforementioned 'consistency check'.
Cmake 3.29.6 still worked fine. I'm using Xcode 15.1.