[CMake] ctest on non build directory : how to deport file outputs ?
Jean-Francois Rit
jean-francois.rit at der.edf.fr
Mon Sep 10 09:31:28 EDT 2012
I am trying to use ctest v2.8.2 for testing an installed piece of
software.
There are no longer source nor build directories, just a "test
directory" containing input test data, reference data, test runners and
CTestTestfile.cmake scripts to rule them all.
It works well when I run ctest from the top test directory. However,
output is generated in this directory, e.g. a Testing directory
containing temporary data for ctest.
I understand that ctest is designed to run on a build directory where
the user has write access. However, I would like to relax the underlying
assumptions that ctest runs from the test directory and has write
access.
The solution of using CMake to copy the test directory to a writable
place, cd to it and run cmake seems contrived to me.
Did I miss something on how to do that, like :
ctest --test-ref-directory=/usr/local/share/magicApp/tests
--test-output-directory=~/tmp ?
Or am I stretching too far the claim [Mastering CMake, §10.4] that
"While CTest works well with CMake, you do not have to use CMake in
order to use CTest" ?
J-F Rit
More information about the CMake
mailing list