From: Michael Wallner Date: Tue, 29 Sep 2020 11:42:47 +0000 (+0200) Subject: cmake: use link_libraries() instead of add_link_options() for sanitizers X-Git-Tag: 1.1.0-beta1~236^2~35 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=de6f641f28758fdbc7890735370adc961a34dc1d;p=awesomized%2Flibmemcached cmake: use link_libraries() instead of add_link_options() for sanitizers --- diff --git a/CMake/CheckDebug.cmake b/CMake/CheckDebug.cmake index 4ab87f25..2c873d86 100644 --- a/CMake/CheckDebug.cmake +++ b/CMake/CheckDebug.cmake @@ -49,7 +49,7 @@ function(check_debug) if(HAVE_ASAN) add_compile_definitions(HAVE_ASAN) add_compile_options(-fsanitize=address) - add_link_options(-lasan) + link_libraries(asan) check_flag(-fsanitize-recover=address IGNORE) endif() endif() @@ -62,7 +62,7 @@ function(check_debug) if(HAVE_UBSAN) add_compile_definitions(HAVE_UBSAN) add_compile_options(-fsanitize=undefined) - add_link_options(-lubsan) + link_libraries(ubsan) check_flag(-fsanitize-recover=undefined IGNORE) endif() endif()