diff --git a/avro/CMakeLists.txt b/avro/CMakeLists.txt index cef0e2e05..81c0bb9ca 100644 --- a/avro/CMakeLists.txt +++ b/avro/CMakeLists.txt @@ -3,6 +3,10 @@ if (AVRO_FOUND AND JANSSON_FOUND) add_library(maxavro maxavro.c maxavro_schema.c maxavro_record.c maxavro_file.c) target_link_libraries(maxavro maxscale-common ${JANSSON_LIBRARIES}) + if(WITH_ASAN AND ASAN_FOUND) + target_link_libraries(maxavro ${ASAN_LIBRARIES}) + endif() + add_executable(maxavrocheck maxavrocheck.c) target_link_libraries(maxavrocheck maxavro) install_executable(maxavrocheck core) diff --git a/server/core/CMakeLists.txt b/server/core/CMakeLists.txt index 503adf401..ce39307e7 100644 --- a/server/core/CMakeLists.txt +++ b/server/core/CMakeLists.txt @@ -54,12 +54,6 @@ add_library(maxscale-common SHARED workertask.cc ) -if(WITH_JEMALLOC) - target_link_libraries(maxscale-common ${JEMALLOC_LIBRARIES}) -elseif(WITH_TCMALLOC) - target_link_libraries(maxscale-common ${TCMALLOC_LIBRARIES}) -endif() - target_link_libraries(maxscale-common ${MARIADB_CONNECTOR_LIBRARIES} ${LZMA_LINK_FLAGS} @@ -80,6 +74,10 @@ target_link_libraries(maxscale-common ${MICROHTTPD_LIBRARIES} ) +if(WITH_ASAN AND ASAN_FOUND) + target_link_libraries(maxscale-common ${ASAN_LIBRARIES}) +endif() + find_library(HAVE_LIBDL NAMES dl) if (HAVE_LIBDL) # libdl just exposes libc functionality on most systems. This means that if