chore: make sanitizers opt in (#6493)

Make code sanitizers opt in with the `CHATTERINO_SANITIZER_SUPPORT` CMake option. After that's enabled, use the `SANITIZE_*` flag to enable individual sanitizers.

Building tests is not required - sanitizers can be enabled in the app by itself.
This commit is contained in:
pajlada
2025-09-25 23:43:54 +02:00
committed by GitHub
parent 117d06b92c
commit 6e0533e1da
7 changed files with 30 additions and 10 deletions
@@ -8,7 +8,10 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
add_sanitizers(${PROJECT_NAME})
if(CHATTERINO_SANITIZER_SUPPORT)
add_sanitizers(${PROJECT_NAME})
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE
twitch-eventsub-ws
+4 -1
View File
@@ -7,7 +7,10 @@ set(SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
add_sanitizers(${PROJECT_NAME})
if(CHATTERINO_SANITIZER_SUPPORT)
add_sanitizers(${PROJECT_NAME})
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE twitch-eventsub-ws GTest::gtest_main)