Skip to content

Commit

Permalink
Disable cpputest's build-in memory_leak_detection completely when ASA…
Browse files Browse the repository at this point in the history
…N is enabled.
  • Loading branch information
PengZheng committed Mar 27, 2022
1 parent 9e9d144 commit d972839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmake/celix_project/CelixProject.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit d972839

Please sign in to comment.