* Add travis sanitizers tests. * Add gcc-7 in Travis. * Add SANITIZER_PATH for CMake. * Enable sanitizer tests in Travis. * Fix memory leaks in tests. * Fix all memory leaks reported by Address Sanitizer. * tests/cpp/helpers.h/CreateDMatrix now returns raw pointer.
14 lines
362 B
CMake
14 lines
362 B
CMake
set(TSan_LIB_NAME tsan)
|
|
|
|
find_library(TSan_LIBRARY
|
|
NAMES libtsan.so libtsan.so.0 libtsan.so.0.0.0
|
|
PATHS ${SANITIZER_PATH} /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib ${CMAKE_PREFIX_PATH}/lib)
|
|
|
|
include(FindPackageHandleStandardArgs)
|
|
find_package_handle_standard_args(TSan DEFAULT_MSG
|
|
TSan_LIBRARY)
|
|
|
|
mark_as_advanced(
|
|
TSan_LIBRARY
|
|
TSan_LIB_NAME)
|