Commit 18a8a666 authored by Dominik Charousset's avatar Dominik Charousset

added --enable-address-sanitizer config option

parent 70c87f40
...@@ -88,14 +88,19 @@ endif () ...@@ -88,14 +88,19 @@ endif ()
if (ENABLE_DEBUG) if (ENABLE_DEBUG)
set(CMAKE_BUILD_TYPE Debug) set(CMAKE_BUILD_TYPE Debug)
add_definitions(-DCPPA_DEBUG_MODE) add_definitions(-DCPPA_DEBUG_MODE)
message(STATUS "----- configured using --enable-debug") message(STATUS "Enable libcppa's debug mode")
endif (ENABLE_DEBUG) endif (ENABLE_DEBUG)
if (ENABLE_ADDRESS_SANITIZER)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
message(STATUS "Enable address sanitizer")
endif (ENABLE_ADDRESS_SANITIZER)
if (CPPA_LOG_LEVEL) if (CPPA_LOG_LEVEL)
add_definitions(-DCPPA_LOG_LEVEL=${CPPA_LOG_LEVEL}) add_definitions(-DCPPA_LOG_LEVEL=${CPPA_LOG_LEVEL})
endif(CPPA_LOG_LEVEL) endif(CPPA_LOG_LEVEL)
message(STATUS "BLUBB: ${CMAKE_BUILD_TYPE}") message(STATUS "Build type: ${CMAKE_BUILD_TYPE}")
# set build default build type if not set # set build default build type if not set
if ("${CMAKE_BUILD_TYPE}" STREQUAL "") if ("${CMAKE_BUILD_TYPE}" STREQUAL "")
......
...@@ -45,6 +45,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]... ...@@ -45,6 +45,7 @@ Usage: $0 [OPTION]... [VAR=VALUE]...
--enable-debug compile in debugging mode --enable-debug compile in debugging mode
(always sets --build-type=Debug) (always sets --build-type=Debug)
--enable-perftools use Google perftools --enable-perftools use Google perftools
--enable-address-sanitizer use Clang's address sanitizer
--with-cppa-log-level=LVL sets the debugging output, possible values: --with-cppa-log-level=LVL sets the debugging output, possible values:
- ERROR - ERROR
- WARNING - WARNING
...@@ -161,6 +162,9 @@ while [ $# -ne 0 ]; do ...@@ -161,6 +162,9 @@ while [ $# -ne 0 ]; do
--enable-debug) --enable-debug)
append_cache_entry ENABLE_DEBUG BOOL true append_cache_entry ENABLE_DEBUG BOOL true
;; ;;
--enable-address-sanitizer)
append_cache_entry ENABLE_ADDRESS_SANITIZER BOOL true
;;
--with-opencl) --with-opencl)
append_cache_entry ENABLE_OPENCL BOOL true append_cache_entry ENABLE_OPENCL BOOL true
;; ;;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment