tests: workaround for incomplete C++17 runtime on macOS

This commit is contained in:
Jean Pierre Cimalando 2021-09-22 05:34:40 +02:00
parent f0b827d423
commit 8bf488897b

View file

@ -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)