Disable cpputest's build-in memory_leak_detection completely when ASAN is enabled.
@@ -29,8 +29,8 @@ if (ENABLE_ADDRESS_SANITIZER)
set(CMAKE_C_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED -fsanitize=address -fno-omit-frame-pointer ${CMAKE_C_FLAGS}")
set(CMAKE_CXX_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED -fsanitize=address -fno-omit-frame-pointer ${CMAKE_CXX_FLAGS}")
else ()
- set(CMAKE_C_FLAGS "-lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_C_FLAGS}")
- set(CMAKE_CXX_FLAGS "-lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_CXX_FLAGS}")
+ set(CMAKE_C_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED -lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_C_FLAGS}")
+ set(CMAKE_CXX_FLAGS "-DCPPUTEST_MEM_LEAK_DETECTION_DISABLED -lasan -fsanitize=address -fno-omit-frame-pointer ${CMAKE_CXX_FLAGS}")
endif ()
endif()
