Skip to content
Permalink
Browse files
Disable cpputest's build-in memory_leak_detection completely when ASA…
…N is enabled.
  • Loading branch information
PengZheng committed Mar 27, 2022
1 parent 9e9d144 commit d972839a3c1df08cc53a3d38ed27bc400acdc7a3
Showing 1 changed file with 2 additions and 2 deletions.
@@ -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()

0 comments on commit d972839

Please sign in to comment.