diff options
author | jackpoz <giacomopoz@gmail.com> | 2019-10-19 16:58:45 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-12-18 23:03:00 +0100 |
commit | 58fe0f9e4acb4cdc83ea70e368d648abe457d54e (patch) | |
tree | dbce8277658ff2409a968ffff3acdb9a355ab052 /cmake/showoptions.cmake | |
parent | 7d63166ff3e819e3043f155b3df4007cccb81dee (diff) |
Build/Misc: Add ASan CMake flag
Allow to enable/disable Address Sanitizer in Clang and GCC from CMake flag "ASAN" of type Boolean. It can be enabled passing -DASAN=TRUE to CMake.
(cherry picked from commit 580f40769c6c446284dd1f5738f67fb3ee802956)
Diffstat (limited to 'cmake/showoptions.cmake')
-rw-r--r-- | cmake/showoptions.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake index 07c78a06b6e..c4e7ebff950 100644 --- a/cmake/showoptions.cmake +++ b/cmake/showoptions.cmake @@ -104,6 +104,13 @@ if ( HELGRIND ) add_definitions(-DHELGRIND) endif() +if ( ASAN ) + message("") + message(" *** ASAN - WARNING!") + message(" *** Please note that this is for DEBUGGING WITH ADDRESS SANITIZER only!") + add_definitions(-DASAN) +endif() + if ( PERFORMANCE_PROFILING ) message("") message(" *** PERFORMANCE_PROFILING - WARNING!") |