[CMake] add_test/memcheck
cabieces julien
cabieces.julien at gmail.com
Thu Aug 8 08:09:22 EDT 2013
Hi
I'm currently using the simple way of testing in Cmake, just adding the two
following instructions at the end of my CMakeLists.txt;
enable_testing()
add_test(TestMyProgram MyProgram)
I follow this instruction : http://cmake.org/Wiki/CMake/Testing_With_CTest
and I would like to make memory checking (and eventually coverage)
In order to do it, I just add "include(CTest)" after enable_testing, and
type in a terminal
ctest -D ExperimentalMemCheck
but now, I would like to customize memchecking (I use valgrind) by setting
a suppression file and tell valgrind to produce a xml-file (that could used
in an other tool or maybe Jenkins).
So according to the documentation I add
file(TO_CMAKE_PATH "${CMAKE_SOURCE_DIR}/resources/valgrind_supp.xml"
MEMORYCHECK_SUPPRESSIONS_FILE)
set(MEMORYCHECK_COMMAND_OPTIONS "--xml=yes --xml-file=test_memcheck.xml")
It doesn't work and it doesn't even modify CMakeCache.txt
What did I miss?
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130808/8a01b360/attachment.htm>
More information about the CMake
mailing list