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