From 7af01b1d0431ff7969c97276bfd4311b8c362700 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 28 Jan 2023 15:45:22 -0800 Subject: [PATCH] Add -fsanitize to debug builds. --- .cmake/ConfigureCompilerFlags.cmake | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.cmake/ConfigureCompilerFlags.cmake b/.cmake/ConfigureCompilerFlags.cmake index c558c9336..7e851f5b6 100644 --- a/.cmake/ConfigureCompilerFlags.cmake +++ b/.cmake/ConfigureCompilerFlags.cmake @@ -1,8 +1,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wno-unused-result -Wno-deprecated-declarations") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++17 -DDEBUG -g -frtti -fexceptions") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++17 -DDEBUG -g -frtti -fexceptions -fsanitize=address,undefined") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DDEBUG") -# enable for additional memory checking with fsanitize -# set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g3 -fsanitize=address,undefined") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++17 -O2 -frtti -fexceptions -Wno-psabi") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -Wno-psabi")