mirror of
https://github.com/wolfpld/tracy.git
synced 2026-10-23 01:00:54 +00:00
Use CMAKE_OSX_DEPLOYMENT_TARGET 15.0 by default
As it is, the CI-built macOS binaries refuse to work on macOS Sequoia because it defaults to the runner machine's level. This sets a lower-than-default default for the target.
This commit is contained in:
@@ -30,15 +30,19 @@ else()
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
if(NOT CMAKE_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "15.0")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "15")
|
||||
message(FATAL_ERROR "Apple Clang 15 or newer is required.")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "16" AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "13.3")
|
||||
# AppleClang 15 has issues with to_chars in <chrono> if target is too old
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-mmacosx-version-min=13.3>)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "13.3")
|
||||
endif()
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fexperimental-library>)
|
||||
endif()
|
||||
message(STATUS "macOS deployment target: ${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
|
||||
Reference in New Issue
Block a user