[CMake] ctest, valgrind & callgrind

Kelly Thompson kgt at lanl.gov
Thu Nov 10 17:56:07 EST 2011


Arnaud,

I use valgrind with options using something like this:

  set( CTEST_MEMORYCHECK_COMMAND valgrind )
  set( CTEST_MEMORYCHECK_COMMAND_OPTIONS "--tool=callgrind -v" )

Let us know if that works.

-kt



> -----Original Message-----
> From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf
Of
> Arnaud Gelas
> Sent: Thursday, November 10, 2011 2:11 PM
> To: cmake at cmake.org
> Subject: [CMake] ctest, valgrind & callgrind
> 
> Hi all,
> 
> I am trying to use callgrind with ctest to profile some component of a
> project.
> 
> I have tried replacing
> 
>          MEMORYCHECK_COMMAND    /usr/bin/valgrind
> 
> by
> 
>          MEMORYCHECK_COMMAND    /usr/bin/valgrind --tool=callgrind -v
> 
> 
> When I run ctest -D ExperimentalMemCheck with the first configuration it
> works fine, when I try with the second one, I get:
> 
> $ ctest -D ExperimentalMemCheck -R LevelSetsv4 -j12
>     Site: snapper
>     Build name: Linux-c++
> Memory check project /home/ajg23/GITROOT/BUILDITK
> Memory checker (MemoryCheckCommand) not set, or cannot find the
> specified program.
> Errors while running CTest
> 
> I assume it'd work...
> 
> Can someone explain to me why I get this message? one work around? or
> what would the right way to proceed?
> 
> Thanks,
> Arnaud
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list