diff options
author | Jehan <jehan@girinstud.io> | 2023-07-17 16:29:08 +0200 |
---|---|---|
committer | Jehan <jehan@girinstud.io> | 2023-07-17 16:30:10 +0200 |
commit | bd983ca108a1c493465270702c02bbbe792ea0ed (patch) | |
tree | aba592a409a297a7704ebaae3549ca2c4240d78c | |
parent | bdd71d88f8347f73f87174028faa25894b1201d8 (diff) |
CMake: enable ASAN in Debug builds.
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index a570264..3a5735b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,9 @@ set (UCHARDET_VERSION_MINOR 0) set (UCHARDET_VERSION_REVISION 8) if (CMAKE_BUILD_TYPE MATCHES Debug) - set (version_suffix .debug) + set(version_suffix .debug) + add_compile_options("-fsanitize=address") + add_link_options("-fsanitize=address") endif (CMAKE_BUILD_TYPE MATCHES Debug) set ( |