Disable vespamalloc when using a sanitizer (e.g. address sanitizer).
@@ -142,8 +142,8 @@ add_subdirectory(vespaclient-java)
add_subdirectory(vespajlib)
add_subdirectory(vespalib)
add_subdirectory(vespalog)
-if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
-else()
+if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND
+ NOT DEFINED VESPA_USE_SANITIZER)
add_subdirectory(vespamalloc)
endif()
add_subdirectory(vsm)
