cmake: Added check for minimum AppleClang version

This commit is contained in:
OpenSauce04 2025-09-02 13:38:12 +01:00 committed by OpenSauce
parent 6483b33ee1
commit 10f6e1f6f7

View File

@ -48,6 +48,15 @@ if (APPLE)
else() else()
# Minimum macOS 13 # Minimum macOS 13
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.4") set(CMAKE_OSX_DEPLOYMENT_TARGET "13.4")
# Catch compiler issue on AppleClang versions below 15.0
# TODO: Remove this check when we drop macOS 13 Ventura
if (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15.0)
message(FATAL_ERROR "AppleClang 15.0 or later is required due to a compiler bug in earlier versions.\n"
"Current version: ${CMAKE_CXX_COMPILER_VERSION}\n"
"After updating, delete 'CMakeCache.txt' in the build directory.")
endif()
endif() endif()
endif() endif()