6e0533e1da
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.
32 lines
619 B
CMake
32 lines
619 B
CMake
project(twitch-eventsub-ws-benchmark)
|
|
|
|
set(SOURCES
|
|
src/main.cpp
|
|
resources/bench.qrc
|
|
|
|
src/parse.cpp
|
|
)
|
|
|
|
add_executable(${PROJECT_NAME} ${SOURCES})
|
|
|
|
if(CHATTERINO_SANITIZER_SUPPORT)
|
|
add_sanitizers(${PROJECT_NAME})
|
|
endif()
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE
|
|
twitch-eventsub-ws
|
|
benchmark::benchmark
|
|
Qt${MAJOR_QT_VERSION}::Core # for QFile
|
|
)
|
|
|
|
set_target_properties(${PROJECT_NAME}
|
|
PROPERTIES
|
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
|
|
CXX_STANDARD 20
|
|
AUTORCC ON
|
|
)
|
|
|
|
if(MSVC)
|
|
target_compile_options(${PROJECT_NAME} PRIVATE /EHsc /bigobj)
|
|
endif()
|