
Cherry-picking the commit from develop since it's also needed for 2.2. FindASAN did not look for so version 5 and TSAN referred to ASAN. Disable leak checks for unit tests as some objects always leak, namely servers.
15 lines
478 B
CMake
15 lines
478 B
CMake
# Find AddressSanitizer libraries
|
|
#
|
|
# The following variables are set:
|
|
# ASAN_FOUND - If AddressSanitizer was found
|
|
# ASAN_LIBRARIES - Path to the libasan library
|
|
|
|
find_library(ASAN_LIBRARIES NAMES libasan.so.0 libasan.so.1 libasan.so.2 libasan.so.3 libasan.so.4 libasan.so.5)
|
|
|
|
if (ASAN_LIBRARIES)
|
|
message(STATUS "Found AddressSanitizer libraries: ${ASAN_LIBRARIES}")
|
|
set(ASAN_FOUND TRUE CACHE INTERNAL "")
|
|
else()
|
|
message(STATUS "Could not find AddressSanitizer")
|
|
endif()
|