We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b0bf7fc commit 48582ecCopy full SHA for 48582ec
1 file changed
tests/CMakeLists.txt
@@ -13,6 +13,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED True)
13
14
project(OleanderStemTestRunner)
15
16
+# Enable AddressSanitizer
17
+if(CMAKE_BUILD_TYPE STREQUAL "Debug")
18
+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
19
+ add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
20
+ add_link_options(-fsanitize=address)
21
+ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
22
+ add_compile_options(/fsanitize=address)
23
+ add_link_options(/fsanitize=address)
24
+ endif()
25
+endif()
26
+
27
add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
28
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
29
0 commit comments