Merge branch 'catch' into v1.x
[awesomized/libmemcached] / CMake / CheckDebug.cmake
index 4ab87f259fa37806ec8fa16db97412d348f09e9c..32fbf26d1ddb1dcd7caf576d4a2fdb13a487e164 100644 (file)
@@ -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(-fsanitize=address)
                     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(-fsanitize=undefined)
                     check_flag(-fsanitize-recover=undefined IGNORE)
                 endif()
             endif()