diff options
-rw-r--r-- | cmake/debug_flags.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/debug_flags.cmake b/cmake/debug_flags.cmake index 0009039..f6be9e2 100644 --- a/cmake/debug_flags.cmake +++ b/cmake/debug_flags.cmake @@ -23,6 +23,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" "-Wformat=2" "-ftrapv" "-fsanitize=undefined" + "-fsanitize=address" "-g" "-Og" "-fno-omit-frame-pointer") @@ -44,7 +45,8 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" add_compile_options("$<$<CONFIG:Debug>:${DEBUG_CXXFLAGS}>") set(DEBUG_LDFLAGS - "-fsanitize=undefined") + "-fsanitize=undefined" + "-fsanitize=address") # add_link_options was introduced in version 3.13. if(${CMAKE_VERSION} VERSION_LESS 3.13) set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${DEBUG_LDFLAGS}") |