<div dir="ltr"><div><div><div><div><div>not better<br><br></div>my CMakeLists.txt : <br><br>enable_testing()<br>include(CTest) # don&#39;t know if it&#39;s necessary<br>add_test(MyProgramTest ./program)<br><br></div>my CTestCustom.cmake in the build dir : <br>

message(&quot;!!!! hello&quot;)<br>set(CTEST_CUSTOM_MEMORYCHECK_COMMAND &quot;/usr/bin/valgrind&quot;)<br>set(CTEST_MEMORYCHECK_COMMAND &quot;/usr/bin/valgrind&quot;)<br>set(MEMORYCHECK_COMMAND &quot;/usr/bin/valgrind&quot;)<br>

<br></div>As you see, I have tried several variable, nothing change.<br><br></div><div>I have tried to put these declaration in the CTestCustom.cmake and I have the following : <br>terminate called after throwing an instance of &#39;std::logic_error&#39;<br>
  what():  basic_string::_S_construct null not valid<br></div><div><br></div>Thanks<br><br></div>Julien<br><div><div><div><br></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/8/8 Rolf Eike Beer <span dir="ltr">&lt;<a href="mailto:eike@sf-mail.de" target="_blank">eike@sf-mail.de</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Am 08.08.2013 14:09, schrieb cabieces julien:<div class="im"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi<br>
<br>
I&#39;m currently using the simple way of testing in Cmake, just adding the two<br>
following instructions at the end of my CMakeLists.txt;<br>
<br>
enable_testing()<br>
add_test(TestMyProgram MyProgram)<br>
<br>
I follow this instruction : <a href="http://cmake.org/Wiki/CMake/Testing_With_CTest" target="_blank">http://cmake.org/Wiki/CMake/<u></u>Testing_With_CTest</a><br>
<br>
and I would like to make memory checking (and eventually coverage)<br>
<br>
In order to do it, I just add &quot;include(CTest)&quot; after enable_testing, and<br>
type in a terminal<br>
<br>
ctest -D ExperimentalMemCheck<br>
<br>
but now, I would like to customize memchecking (I use valgrind) by setting<br>
a suppression file and tell valgrind to produce a xml-file (that could used<br>
in an other tool or maybe Jenkins).<br>
<br>
So according to the documentation I add<br>
file(TO_CMAKE_PATH &quot;${CMAKE_SOURCE_DIR}/<u></u>resources/valgrind_supp.xml&quot;<br>
MEMORYCHECK_SUPPRESSIONS_FILE)<br>
set(MEMORYCHECK_COMMAND_<u></u>OPTIONS &quot;--xml=yes --xml-file=test_memcheck.xml&quot;)<br>
</blockquote>
<br></div>
You must put these into CTestCustom.cmake in your build dir.<br>
<br>
Eike<br>
--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/<u></u>CMake_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" target="_blank">http://cmake.org/cmake/help/<u></u>support.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" target="_blank">http://cmake.org/cmake/help/<u></u>consulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" target="_blank">http://cmake.org/cmake/help/<u></u>training.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/<u></u>listinfo/cmake</a><br>
</blockquote></div><br></div>