From 305c4eb9d4b1b6a233ba0c01242c87f2d853e874 Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Sat, 9 Dec 2017 07:58:56 -0800 Subject: Build debug builds with address sanitizer --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5cd014d3..ab62cad6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,8 @@ SET( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" ) include(GNUInstallDirs) if(${CMAKE_BUILD_TYPE} MATCHES [Dd]ebug) - set(HARDINFO_DEBUG 1) + set(HARDINFO_DEBUG 1) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address") endif() if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Linux") -- cgit v1.2.3