Return of the ASAN option

This commit is contained in:
Vlj 2014-08-12 20:19:31 +02:00
parent 44c03ce99d
commit 483ad109e3

View File

@ -30,6 +30,7 @@ endif()
if(UNIX AND NOT APPLE)
option(USE_XRANDR "Use xrandr instead of vidmode" ON)
option(USE_ASAN "Build with Leak/Address sanitizer" OFF)
endif()
set(STK_SOURCE_DIR "src")
@ -254,6 +255,11 @@ if(UNIX AND NOT APPLE)
else()
target_link_libraries(supertuxkart ${IRRLICHT_XF86VM_LIBRARY})
endif()
if(USE_ASAN)
add_definitions("-fsanitize=address")
add_definitions("-fno-omit-frame-pointer")
target_link_libraries(supertuxkart "-fsanitize=address")
endif()
endif()
if(APPLE)