aboutsummaryrefslogtreecommitdiff
path: root/cmake/showoptions.cmake
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2019-10-19 16:58:45 +0200
committerjackpoz <giacomopoz@gmail.com>2019-10-19 20:12:48 +0200
commit580f40769c6c446284dd1f5738f67fb3ee802956 (patch)
treee311dccaa4a8f39d18235dec28cc4de1683e1c8a /cmake/showoptions.cmake
parent50307d9222596ca81884a35ac5ad95638978fb3f (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.
Diffstat (limited to 'cmake/showoptions.cmake')
-rw-r--r--cmake/showoptions.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmake/showoptions.cmake b/cmake/showoptions.cmake
index 6094198e76a..d53792ef484 100644
--- a/cmake/showoptions.cmake
+++ b/cmake/showoptions.cmake
@@ -105,6 +105,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!")