From 32eae6dfcd45065741d9b224e1f839b42301d723 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 21 May 2022 23:22:39 -0600 Subject: [PATCH] build: fix ERICWTOOLS_ASAN with Catch2 on Windows --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index db8f7e14..b42a391c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -75,6 +75,11 @@ if (ERICWTOOLS_ASAN) message(STATUS "Enabling ASan on all targets") add_compile_options(-fsanitize=address) add_link_options(-fsanitize=address) + + # https://github.com/catchorg/Catch2/issues/898#issuecomment-841733322 + if (WIN32) + add_compile_definitions(CATCH_CONFIG_NO_WINDOWS_SEH) + endif() endif() if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_SIMULATE_ID STREQUAL "MSVC")