[CMake] RUN_TESTS project & dependencies

Robert Dailey rcdailey at gmail.com
Fri Mar 20 16:50:45 EDT 2009


On Fri, Mar 20, 2009 at 9:33 AM, Marcel Loose <loose at astron.nl> wrote:

> Hi Robert,
>
> I am planning to use (but haven't implemented and tried yet):
>
> - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
>  to define a custom 'check' target (as with GNU Autotools)
>
> - add_executable(<testprog> EXCLUDE_FROM_ALL ...)
>  for each test program
>
> - add_dependencies(check <testprog>)
>  for each <testprog> you want to be compiled, linked and run
>
> Hope it helps.


I just tried this and it works beautifully. Thank you. This will be an
acceptable workaround until this is actually a supported feature in CMake.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090320/c873d10d/attachment.htm>


More information about the CMake mailing list