this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add various debug options to CMake (#2534)

authored by

Alice and committed by
GitHub
a7d076a5 23998c76

+12
+12
CMakeLists.txt
··· 36 36 option(BUILD_PLAYER "Build standalone players" ${BUILD_PLAYER_DEFAULT}) 37 37 option(BUILD_TOUCH_INPUT "Build with touch input support" ${BUILD_TOUCH_INPUT_DEFAULT}) 38 38 option(BUILD_STUB "Build stub without editors" OFF) 39 + option(BUILD_NO_OPTIMIZATION "Build without optimizations for debugging" OFF) 40 + option(BUILD_ASAN_DEBUG "Build with AddressSanitizer" OFF) 41 + 42 + if (BUILD_NO_OPTIMIZATION) 43 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0") 44 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0") 45 + endif() 46 + 47 + if (BUILD_ASAN_DEBUG) 48 + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address -fno-omit-frame-pointer") 49 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer") 50 + endif() 39 51 40 52 if(NOT BUILD_SDL) 41 53 set(BUILD_SDLGPU OFF)