MacOS: Add workaround for std::variant

This commit is contained in:
Jonathan G Rennison
2023-01-02 18:58:53 +00:00
parent 24b744f7c8
commit 5e76e6fb07
3 changed files with 25 additions and 0 deletions

View File

@@ -193,4 +193,9 @@ macro(compile_flags)
# rdynamic is used to get useful stack traces from crash reports.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
endif()
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
# workaround for MacOS 10.13 and below which does not support std::variant, etc
add_definitions(-D_LIBCPP_DISABLE_AVAILABILITY)
endif()
endmacro()