diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 458d39860..aab540126 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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.")