diff options
| author | luwenpeng <[email protected]> | 2020-10-15 10:05:46 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2020-10-15 19:46:35 +0800 |
| commit | 0af5267002888090fc39196b86c8d79bf7362f46 (patch) | |
| tree | 7a8ffd1e4a4fe9231dd6bd6b4a15de41c9bc98f6 /CMakeLists.txt | |
| parent | 24f79a5a2050f6ee538e844b957bf79ac866b783 (diff) | |
asan using devtoolset-7
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 1efdd1b..3f3a69d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,10 +21,10 @@ endif() option(ENABLE_PIC "Generate position independent code (necessary for shared libraries)" TRUE) option(ENABLE_WARNING_ALL "Enable all optional warnings which are desirable for normal code" TRUE) -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - option(ENABLE_SANITIZE_ADDRESS "Enable AddressSanitizer" TRUE) -else() +if(NOT ASAN_OPTION) option(ENABLE_SANITIZE_ADDRESS "Enable AddressSanitizer" FALSE) +else() + option(ENABLE_SANITIZE_ADDRESS "Enable AddressSanitizer" TRUE) endif() option(ENABLE_SANITIZE_THREAD "Enable ThreadSanitizer" FALSE) |
