diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2017-12-09 07:58:56 -0800 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2017-12-09 07:58:56 -0800 |
commit | 305c4eb9d4b1b6a233ba0c01242c87f2d853e874 (patch) | |
tree | 8badcbc019994eba3be63e601d27d63fbc817fdb /CMakeLists.txt | |
parent | 44c925eb1a04ff5a5c63e70c427e644690557bb9 (diff) |
Build debug builds with address sanitizer
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 3 |
1 files changed, 2 insertions, 1 deletions
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") |