summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPierre Joye <pierre.php@gmail.com>2021-08-14 01:45:28 +0700
committerPierre Joye <pierre.php@gmail.com>2021-08-14 01:45:28 +0700
commit08e11534f68914ea46c4769e90b36f810520eb07 (patch)
treee025c32305fcf76e89eb13dd052bd7c48ab900ed /CMakeLists.txt
parentb68f9a34c08e01be823de04d448e4da9ddba9125 (diff)
downloadlibgd-08e11534f68914ea46c4769e90b36f810520eb07.tar.gz
add sanitize=address by default in debug and gcc
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8a2d79f..ad6ed04 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,7 @@ endif(BUILD_TEST)
# - specify -DCMAKE_C_FLAGS=... on invocation of cmake, or
# - specify CFLAGS=... on invocation of make
IF(CMAKE_COMPILER_IS_GNUCC)
- SET(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -O0") # will be added to CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
+ SET(CMAKE_C_FLAGS_DEBUG "-g -Wall -Wextra -O0 -fsanitize=address") # will be added to CMAKE_C_FLAGS when CMAKE_BUILD_TYPE is "Debug"
ENDIF(CMAKE_COMPILER_IS_GNUCC)
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY
${PROJECT_BINARY_DIR}/Bin