Commit d8286407 authored by Ronan's avatar Ronan Committed by Ronan

chore(CMakeLists.txt): enable UndefinedBehaviorSanitizer if ENABLE_SANITIZER is true.

parent a3ffb689
......@@ -412,7 +412,7 @@ macro(linphone_builder_apply_extra_flags PROJNAME)
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${_no_warnings_flag}")
endif()
if(ENABLE_SANITIZER AND EP_${PROJNAME}_SANITIZABLE)
set(sanitize_flags "-fsanitize=address")
set(sanitize_flags "-fsanitize=address,undefined")
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
......
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