Skip to content
Snippets Groups Projects
Commit 2720993a authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud
Browse files

cmake: add ASAN option

Change-Id: I5ae4fe47e00172eda2e1b51d9dd31a6157540179
parent 9f64b9ec
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,13 @@ option(JAMI_VIDEO "Build with video support" ON)
option(JAMI_VIDEO_ACCEL "Build video hardware acceleration support" ON)
option(BUILD_CONTRIB "Build contrib to CONTRIB_PATH" ON)
option(BUILD_EXTRA_TOOLS "Build extra tools" OFF)
option(ENABLE_ASAN "Enable address sanitization" OFF)
if(ENABLE_ASAN AND NOT MSVC)
message(STATUS "Address sanitization enabled for daemon")
# Add AddressSanitizer flags for both compiler and linker
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
endif()
include(CTest)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment