[CMake] how to add a test that calls ctest
Kris Thielemans
kris.f.thielemans at gmail.com
Sat Dec 23 03:12:26 EST 2017
Hi
We have a superbuild-type project
https://github.com/CCPPETMR/SIRF-SuperBuild where we want to add tests that
call ctest for the dependent projects. We do this as
COMMAND ${CMAKE_CTEST_COMMAND} WORKING_DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/SIRF-prefix/src/SIRF-build/)
which works fine when using Makefiles, but fails with Visual Studio as we
don't pass the "-C config" flag. So how do we put this in? I tried
COMMAND ${CMAKE_CTEST_COMMAND} -C ${CMAKE_CFG_INTDIR} -VV
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/SIRF-prefix/src/SIRF-build/)
But this gives me errors like
1: 4: Test command: NOT_AVAILABLE
1: Test not available in configuration "$(Configuration)".
Best wishes
Kris Thielemans
Reader in Medical Imaging Physics at University College London
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cmake.org/pipermail/cmake/attachments/20171223/c5dc73a6/attachment-0001.html>
More information about the CMake
mailing list