Add 'memcheck' (valgrind) target to CMake

This commit is contained in:
Manuel Pégourié-Gonnard 2013-09-07 16:52:42 +02:00 committed by Paul Bakker
parent bc4b7f08ba
commit 7669f28421
2 changed files with 7 additions and 0 deletions

View file

@ -46,3 +46,9 @@ add_subdirectory(programs)
ADD_CUSTOM_TARGET(apidoc ADD_CUSTOM_TARGET(apidoc
COMMAND doxygen doxygen/polarssl.doxyfile COMMAND doxygen doxygen/polarssl.doxyfile
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
ADD_CUSTOM_TARGET(memcheck
COMMAND ctest -R aes -O memcheck.log -D ExperimentalMemCheck
COMMAND tail -n1 memcheck.log | grep 'Memory checking results:' > /dev/null
COMMAND rm -f memcheck.log
)

View file

@ -1,3 +1,4 @@
Site: localhost Site: localhost
BuildName: PolarSSL-test BuildName: PolarSSL-test
CoverageCommand: /usr/bin/gcov CoverageCommand: /usr/bin/gcov
MemoryCheckCommand: /usr/bin/valgrind