diff options
| author | luwenpeng <[email protected]> | 2020-10-13 10:17:57 +0800 |
|---|---|---|
| committer | luwenpeng <[email protected]> | 2020-10-13 10:18:28 +0800 |
| commit | b5970eedc4fb893616ec37059feb055b53c48712 (patch) | |
| tree | adee71325e1d53f84812182574001c12631e168b | |
| parent | 24db7db86d121b93959c6764bc138bcb503b6b4e (diff) | |
TFE debug 版本默认启用 asan
| -rw-r--r-- | CMakeLists.txt | 8 | ||||
| -rw-r--r-- | ci/travis.sh | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b7d00ce..1efdd1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,13 @@ endif() # Global compile options 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) -option(ENABLE_SANITIZE_ADDRESS "Enable AddressSanitizer" FALSE) + +if(CMAKE_BUILD_TYPE STREQUAL "Debug") + option(ENABLE_SANITIZE_ADDRESS "Enable AddressSanitizer" TRUE) +else() + option(ENABLE_SANITIZE_ADDRESS "Enable AddressSanitizer" FALSE) +endif() + option(ENABLE_SANITIZE_THREAD "Enable ThreadSanitizer" FALSE) # Plugins diff --git a/ci/travis.sh b/ci/travis.sh index 77a9977..d64dab7 100644 --- a/ci/travis.sh +++ b/ci/travis.sh @@ -36,6 +36,7 @@ env | sort yum install -y mrzcpd numactl-devel zlib-devel librdkafka-devel systemd-devel yum install -y libcjson-devel libmaatframe-devel libMESA_field_stat2-devel libMESA_handle_logger-devel yum install -y libMESA_htable-devel libMESA_prof_load-devel librulescan-devel libwiredcfg-devel libWiredLB-devel sapp-devel +yum install -y libasan mkdir build || true cd build |
