forked from such-gitea/wownero-lws
Add sanitizer option to build and add CI that uses it (#184)
This commit is contained in:
committed by
Lee *!* Clagett
parent
a11482c123
commit
48060d1111
@@ -45,6 +45,17 @@ endif()
|
||||
set (LWS_BUILD_TESTS "${BUILD_TESTS}")
|
||||
set (BUILD_TESTS "Off")
|
||||
|
||||
option(SANITIZER "Use specific sanitizer" OFF)
|
||||
if(NOT SANITIZER STREQUAL "OFF")
|
||||
if (MSVC)
|
||||
message(FATAL_ERROR "Cannot sanitize with MSVC")
|
||||
else()
|
||||
message(STATUS "Using sanitizer=${SANITIZER}")
|
||||
add_compile_options("-fsanitize=${SANITIZER}")
|
||||
add_link_options("-fsanitize=${SANITIZER}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(STATIC)
|
||||
if(MSVC)
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .dll.a .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
|
||||
Reference in New Issue
Block a user