Make sanitizers truly optional (#4689)
This commit is contained in:
+1
-1
@@ -91,7 +91,7 @@ if (WIN32)
|
||||
find_package(WinToast REQUIRED)
|
||||
endif ()
|
||||
|
||||
find_package(Sanitizers)
|
||||
find_package(Sanitizers QUIET)
|
||||
|
||||
# Find boost on the system
|
||||
# `OPTIONAL_COMPONENTS random` is required for vcpkg builds to link.
|
||||
|
||||
+6
-1
@@ -710,7 +710,12 @@ if (BUILD_APP)
|
||||
else()
|
||||
add_executable(${EXECUTABLE_PROJECT} main.cpp)
|
||||
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/)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user