aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-10 11:25:12 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-23 11:27:34 +0000
commit1a379ef656622ac535774e7111e85e02b6aa1d8a (patch)
tree120d2ea21cfa58809ed69fc3e9f8a0b5c1820a2f /CMakeLists.txt
parentfuzz_testing: create out directory if needed, and fix filename passing (diff)
downloadmonero-1a379ef656622ac535774e7111e85e02b6aa1d8a.tar.xz
fuzz_testing: build with ASAN (assumed to be available)
Diffstat (limited to '')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b11d6ba6f..11c549d7c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,6 +238,16 @@ if(STATIC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DZMQ_STATIC")
endif()
+if(SANITIZE)
+ if (MSVC)
+ message(FATAL_ERROR "Cannot sanitize with MSVC")
+ else()
+ message(STATUS "Using ASAN")
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address")
+ endif()
+endif()
+
# Set default blockchain storage location:
# memory was the default in Cryptonote before Monero implimented LMDB, it still works but is unneccessary.
# set(DATABASE memory)