[CMake] Accessing cache variable from CTest script

Davide Mancusi arekfu at gmail.com
Fri Aug 24 09:46:13 EDT 2012


Hello everyone,

I have tried asking this question on stackoverflow [1] without much
luck, so here we go:

My project links to a third-party library that comes with a valgrind
suppression file, as well as a CMake script. The script stores the
location of the suppression file in a CMake cache variable.

I have written a CTest script to build and test my project and I would
like to use the suppression file during the memory-checking stage.
Unfortunately, the CTest script does not seem to know anything about
the CMake cache. How can I access the CMake cache variable from my
CTest script?

Thanks in advance for the help.
Davide

[1] http://stackoverflow.com/questions/12108741/access-cmake-cache-variable-from-ctest-script


More information about the CMake mailing list