Commit 7c10db3d15e81049fc098271ba7cc46a6edfbe69

Steffen Jaeckel 2022-04-28T11:41:40

support Valgrind for tests when using CMake Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>

1
2
3
4
5
6
7
8
9
10
11
diff --git a/demo/CMakeLists.txt b/demo/CMakeLists.txt
index 06ff898..c44b7c2 100644
--- a/demo/CMakeLists.txt
+++ b/demo/CMakeLists.txt
@@ -61,3 +61,6 @@ target_link_options(${LTM_TEST} BEFORE PUBLIC
 # CTest
 #-----------------------------------------------------------------------------
 add_test(NAME ${LTM_TEST} COMMAND ${LTM_TEST})
+
+find_program(MEMORYCHECK_COMMAND valgrind)
+set(MEMORYCHECK_COMMAND_OPTIONS "--trace-children=yes --leak-check=full")