From e49cc80365bfba4f376dba34e704710b6f848892 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 17 Sep 2013 16:09:21 +0000 Subject: [PATCH] Provide a clean_test and prune_test target git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30768 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/CMakeLists.txt | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2ed082c8be..95e998ccf2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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" -- 2.39.5