refactor(cmake): Split memcheck command into summary/full

This commit is contained in:
Michael Carlberg 2016-12-14 15:11:37 +01:00
parent 0b949ee3bb
commit 698c494068
1 changed files with 9 additions and 5 deletions

View File

@ -49,12 +49,16 @@ add_custom_command(TARGET codecheck-fix COMMAND
# Target: memcheck (valgrind) {{{
add_custom_target(memcheck)
add_custom_command(TARGET memcheck COMMAND
valgrind
--tool=memcheck
--leak-check=yes
add_custom_command(TARGET memcheck COMMAND valgrind
--leak-check=summary
--suppressions=${PROJECT_SOURCE_DIR}/.valgrind-suppressions
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME} example --config=${PROJECT_SOURCE_DIR}/examples/config)
add_custom_target(memcheck-full)
add_custom_command(TARGET memcheck-full COMMAND valgrind
--leak-check=full
--track-origins=yes
--show-reachable=yes
--track-fds=yes
--suppressions=${PROJECT_SOURCE_DIR}/.valgrind-suppressions
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME} example --config=${PROJECT_SOURCE_DIR}/examples/config)