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

View File

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