[CMake] test dependencies

Alexandre Gramfort alexandre.gramfort at inria.fr
Fri Mar 12 12:37:28 EST 2010


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


More information about the CMake mailing list