mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Make sanitizers truly optional (#4689)
This commit is contained in:
parent
36bc8e0520
commit
2d3d3ae46e
|
@ -91,7 +91,7 @@ if (WIN32)
|
||||||
find_package(WinToast REQUIRED)
|
find_package(WinToast REQUIRED)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
find_package(Sanitizers)
|
find_package(Sanitizers QUIET)
|
||||||
|
|
||||||
# Find boost on the system
|
# Find boost on the system
|
||||||
# `OPTIONAL_COMPONENTS random` is required for vcpkg builds to link.
|
# `OPTIONAL_COMPONENTS random` is required for vcpkg builds to link.
|
||||||
|
|
|
@ -710,7 +710,12 @@ if (BUILD_APP)
|
||||||
else()
|
else()
|
||||||
add_executable(${EXECUTABLE_PROJECT} main.cpp)
|
add_executable(${EXECUTABLE_PROJECT} main.cpp)
|
||||||
endif()
|
endif()
|
||||||
add_sanitizers(${EXECUTABLE_PROJECT})
|
|
||||||
|
if(COMMAND add_sanitizers)
|
||||||
|
add_sanitizers(${EXECUTABLE_PROJECT})
|
||||||
|
else()
|
||||||
|
message(WARNING "Sanitizers support is disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
target_include_directories(${EXECUTABLE_PROJECT} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/autogen/)
|
target_include_directories(${EXECUTABLE_PROJECT} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_BINARY_DIR}/autogen/)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue