]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Provide a clean_test and prune_test target
authorMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 17 Sep 2013 16:09:21 +0000 (16:09 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 17 Sep 2013 16:09:21 +0000 (16:09 +0000)
git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30768 0785d39b-7218-0410-832d-ea1e28bc413d

tests/CMakeLists.txt

index 2ed082c8be93ad93c57721f406b4af651b276a93..95e998ccf228453926c87376a88c2e140bd97eb5 100644 (file)
@@ -65,11 +65,17 @@ FOREACH(_var ${_variables})
 ENDFOREACH()
 
 #
-# Two custom targets to setup and cleanup the testsuite:
+# Custom targets to set and clean up the testsuite:
 #
 
+# Setup tests:
 ADD_CUSTOM_TARGET(setup_test)
-ADD_CUSTOM_TARGET(cleanup_test)
+
+# Clean all tests
+ADD_CUSTOM_TARGET(clean_test)
+
+# Remove all tests:
+ADD_CUSTOM_TARGET(prune_test)
 
 #
 # The list of subfolders to set up:
@@ -132,11 +138,17 @@ FOREACH(_category ${_categories})
   ADD_DEPENDENCIES(setup_test_${_category} library)
   ADD_DEPENDENCIES(setup_test setup_test_${_category})
 
-  ADD_CUSTOM_TARGET(cleanup_test_${_category}
+  ADD_CUSTOM_TARGET(clean_test_${_category}
+    COMMAND [ ! -d ${_category} ] || ${CMAKE_COMMAND}
+      --build ${CMAKE_CURRENT_BINARY_DIR}/${_category} --target clean
+    )
+  ADD_DEPENDENCIES(clean_test clean_test_${_category})
+
+  ADD_CUSTOM_TARGET(prune_test_${_category}
     COMMAND ${CMAKE_COMMAND} -E remove_directory
       ${CMAKE_CURRENT_BINARY_DIR}/${_category}
     )
-  ADD_DEPENDENCIES(cleanup_test cleanup_test_${_category})
+  ADD_DEPENDENCIES(prune_test prune_test_${_category})
 
   FILE(APPEND ${CMAKE_CURRENT_BINARY_DIR}/deal.IITestfile.cmake
     "SUBDIRS(${_category})\n"

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.