[CMake] ctest: how to include pre- and post- processing commands
TS
tzsariysk at gmail.com
Thu Jun 30 08:37:07 EDT 2016
Hi,
Apologize if I sent this twice.
Is it possible to have a ctest which involves preprocessing as well as
postprocessing. The code to test is myCode.exe, which writes an output file.
PASS or FAIL is the result of comparison of output against reference data.
Currently I use two add_tests:
ADD_TEST(NAME test COMMAND mpiexec --np 8 myCode.exe input output)
ADD_TEST(NAME comp COMMAND compare.exe output refdata 1.e-6)
It works, but reports two tests, 'test' and 'comp', while in essence these
are two steps of a single test. Is there a better way to achieve this?
I would like to add a preprocessing step, which removes output (if any) from
previous tests. I tried
ADD_TEST(NAME rm COMMAND /bin/rm output)
but because rm is not build by cmake, it complains that cannot find it.
Any help is highly appreciated,
Thanks,
Ted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160630/6ac8d780/attachment.html>
More information about the CMake
mailing list