diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 2275c61..1554201 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,6 +3,11 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/cmake/") set(PARSE_CATCH_TESTS_ADD_TO_CONFIGURE_DEPENDS ON) include(ParseAndAddCatchTests) +if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" AND UNIX AND NOT APPLE) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") + set(CMAKE_EXE_LINKER_FLAGS "-lc++abi") +endif() + function(SetTestCompileOptions target_name) target_compile_options(${target_name} PRIVATE $<$:-s DISABLE_EXCEPTION_CATCHING=0>