mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-03 08:58:26 +00:00
Merge pull request #1466 from akx/macos-level
Use CMAKE_OSX_DEPLOYMENT_TARGET 15.0 by default
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