mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
CTest: Fix test DEPEND cycle detection
A cycle exists when the DFS returns to the root node, not just when multiple paths lead to the same node. Inspired-By: Alexander Esilevich <aesilevich@pathscale.com>
This commit is contained in:
@@ -3,3 +3,15 @@
|
||||
#
|
||||
ADD_EXECUTABLE(testing2 testing2.cxx)
|
||||
ADD_TEST(testing.2 ${Testing_BINARY_DIR}/bin/testing2)
|
||||
|
||||
add_test(NotCycle.a ${CMAKE_COMMAND} -E echo a)
|
||||
add_test(NotCycle.test1 ${CMAKE_COMMAND} -E echo test1)
|
||||
set_property(TEST NotCycle.test1 PROPERTY DEPENDS NotCycle.a)
|
||||
|
||||
add_test(NotCycle.b ${CMAKE_COMMAND} -E echo b)
|
||||
add_test(NotCycle.test2 ${CMAKE_COMMAND} -E echo test2)
|
||||
set_property(TEST NotCycle.test2 PROPERTY DEPENDS NotCycle.b NotCycle.test1)
|
||||
|
||||
add_test(NotCycle.c ${CMAKE_COMMAND} -E echo c)
|
||||
add_test(NotCycle.test3 ${CMAKE_COMMAND} -E echo test3)
|
||||
set_property(TEST NotCycle.test3 PROPERTY DEPENDS NotCycle.c NotCycle.test1 NotCycle.test2)
|
||||
|
||||
Reference in New Issue
Block a user