support Valgrind for tests when using CMake Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
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")