Trying to fix unit tests when targeting OSX 10.9.

This commit is contained in:
bubnikv 2019-12-22 14:17:26 +01:00
parent e2fd540815
commit 4473254779

View File

@ -8,6 +8,11 @@ add_library(Catch2 INTERFACE)
list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake/modules/Catch2)
target_include_directories(Catch2 INTERFACE ${CMAKE_CURRENT_LIST_DIR})
add_library(Catch2::Catch2 ALIAS Catch2)
if (APPLE)
# OSX builds targeting OSX 10.9 do not support new std::uncought_exception()
# see https://github.com/catchorg/Catch2/issues/1218
target_compile_definitions(Catch2 PUBLIC -DCATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS)
endif()
include(Catch)
set(CATCH_EXTRA_ARGS "" CACHE STRING "Extra arguments for catch2 test suites.")