summaryrefslogtreecommitdiffstats
path: root/Tests/Testing
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-12-15 21:49:34 (GMT)
committerBrad King <brad.king@kitware.com>2010-12-15 21:49:34 (GMT)
commitf48d3bc5ba69906ee3c61ddb103a91bf6467c86d (patch)
tree23d97fa05e6bc27310d8be7cbb5a0fc94df7efba /Tests/Testing
parenta14a8562ea5f321b0a8f6f61f4c457da298825c5 (diff)
downloadCMake-f48d3bc5ba69906ee3c61ddb103a91bf6467c86d.zip
CMake-f48d3bc5ba69906ee3c61ddb103a91bf6467c86d.tar.gz
CMake-f48d3bc5ba69906ee3c61ddb103a91bf6467c86d.tar.bz2
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>
Diffstat (limited to 'Tests/Testing')
-rw-r--r--Tests/Testing/Sub/Sub2/CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/Testing/Sub/Sub2/CMakeLists.txt b/Tests/Testing/Sub/Sub2/CMakeLists.txt
index 3a7295d..fb9e861 100644
--- a/Tests/Testing/Sub/Sub2/CMakeLists.txt
+++ b/Tests/Testing/Sub/Sub2/CMakeLists.txt
@@ -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)