[CMake] test dependencies

David Cole david.cole at kitware.com
Fri Mar 12 13:32:19 EST 2010


ctest -R "test1|test2" ?

Using -R says "run only the tests that match this regex" -- it does not say
"run the matching tests after running all the tests they depend on first"...


On Fri, Mar 12, 2010 at 12:37 PM, Alexandre Gramfort <
alexandre.gramfort at inria.fr> wrote:

> Hi,
>
> here is a simple CMakeList to illustrate my problem:
>
> -----------
>
> PROJECT(Test)
>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
>
> ENABLE_TESTING()
>
> ADD_TEST(test1 ${CMAKE_COMMAND} -E touch test1.txt)
> ADD_TEST(test2 ${CMAKE_COMMAND} -E touch test2.txt)
> SET_TESTS_PROPERTIES(test2 PROPERTIES DEPENDS test1)
>
> -----------
>
> now if I run : ctest -R test2
>
> only test2 is run although test2 depends on test1 and test1 should be run
> first.
>
> Is there a solution?
>
> I'm running cmake 2.8.0 on Mac
>
> Thanks
> Alexandre
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100312/11fcba10/attachment.htm>


More information about the CMake mailing list