Enable ubsan and tsan by default only if it's a debug build
This commit is contained in:
parent
c46c7778b6
commit
68e30aa968
|
@ -31,12 +31,16 @@ set(SOURCES main.cpp event_loop.cpp logcat_thread.cpp logcat_entry.cpp log.cpp c
|
|||
set(IMGUI_SOURCES imgui/imgui.cpp imgui/imgui_draw.cpp imgui/imgui_widgets.cpp imgui/imgui_tables.cpp
|
||||
imgui/misc/cpp/imgui_stdlib.cpp imgui/misc/freetype/imgui_freetype.cpp
|
||||
imgui/backends/imgui_impl_sdl.cpp imgui/backends/imgui_impl_opengl3.cpp)
|
||||
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||
set(SOURCES ${SOURCES} windows/debug.cpp)
|
||||
set(IMGUI_SOURCES ${IMGUI_SOURCES} imgui/imgui_demo.cpp)
|
||||
if ("${FLAGS}" STREQUAL "")
|
||||
set(FLAGS "-fsanitize=undefined,thread")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(FLAGS "-fsanitize=undefined,thread -DIMGUI_USER_CONFIG='\"../myimconfig.h\"'")
|
||||
set(FLAGS "${FLAGS} -DIMGUI_USER_CONFIG='\"../myimconfig.h\"'")
|
||||
# https://t.me/NightShadowsHangout/670691
|
||||
set(FLAGS "${FLAGS} -Werror -Wall -Wextra -Wshadow -Wpedantic -Wno-gnu-anonymous-struct -fno-rtti -fPIC -Wconversion -Wno-unused-parameter -Wimplicit-fallthrough")
|
||||
# https://sourceforge.net/p/valgrind/mailman/valgrind-users/thread/Ygze8PzaQAYWlKDj%40wildebeest.org/
|
||||
|
|
Loading…
Reference in New Issue