From 8bf488897b4a8a234e976668fcdc95b9002594e8 Mon Sep 17 00:00:00 2001 From: Jean Pierre Cimalando Date: Wed, 22 Sep 2021 05:34:40 +0200 Subject: [PATCH] tests: workaround for incomplete C++17 runtime on macOS --- tests/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9ae219db..fa708458 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -56,6 +56,10 @@ set(SFIZZ_TEST_SOURCES add_executable(sfizz_tests ${SFIZZ_TEST_SOURCES}) target_link_libraries(sfizz_tests PRIVATE sfizz::internal sfizz::static sfizz::spin_mutex sfizz::jsl sfizz::filesystem) +if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET VERSION_LESS "10.12") + # workaround for incomplete C++17 runtime on macOS + target_compile_definitions(sfizz_tests PRIVATE "CATCH_CONFIG_NO_CPP17_UNCAUGHT_EXCEPTIONS") +endif() sfizz_enable_lto_if_needed(sfizz_tests) sfizz_enable_fast_math(sfizz_tests) catch_discover_tests(sfizz_tests)