From 9b4aec096e3c05124bb46c9d9dc18468b3646e95 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Tue, 2 Jul 2019 09:51:45 +0300 Subject: [PATCH] Define ASan_SHARED_LIB that may be used without ASan_WRAPPER --- cmake/FindASan.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/FindASan.cmake b/cmake/FindASan.cmake index a6a7277..6d401a4 100644 --- a/cmake/FindASan.cmake +++ b/cmake/FindASan.cmake @@ -49,7 +49,11 @@ endif() if (SANITIZE_ADDRESS) find_program(ASan_WRAPPER "asan-wrapper" PATHS ${CMAKE_MODULE_PATH}) - mark_as_advanced(ASan_WRAPPER) + mark_as_advanced(ASan_WRAPPER) + if (CMAKE_SYSTEM_NAME EQUAL "Linux") + find_library(ASan_SHARED_LIB "clang_rt.asan-x86_64" PATH_SUFFIXES "linux") + mark_as_advanced(ASan_SHARED_LIB) + endif() endif () function (add_sanitize_address TARGET)