From: Matthias Maier Date: Thu, 22 Aug 2013 23:42:57 +0000 (+0000) Subject: Introduce DEAL_II_PICKUP_REGEX X-Git-Tag: v8.1.0~570^2~417 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d2c10e0dae0fc1fc76ecfe69a3a6e420dd12764;p=dealii.git Introduce DEAL_II_PICKUP_REGEX git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@30442 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake b/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake index e3b907ee95..a998030039 100644 --- a/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -17,6 +17,9 @@ # # A Macro to pick up all tests in a test subdirectory # +# If DEAL_II_PICKUP_REGEX is set, only tests matching the regex will be +# processed. +# # Usage: # DEAL_II_PICKUP_TESTS() # @@ -28,17 +31,22 @@ MACRO(DEAL_II_PICKUP_TESTS) FOREACH(_test ${_tests}) - GET_FILENAME_COMPONENT(_test ${_test} NAME_WE) + IF( "${DEAL_II_PICKUP_REGEX}" STREQUAL "" OR + _test MATCHES "${DEAL_II_PICKUP_REGEX}" ) + GET_FILENAME_COMPONENT(_test ${_test} NAME_WE) + + IF(_test MATCHES debug) + SET(_configuration DEBUG) + ELSEIF(_test MATCHES release) + SET(_configuration RELEASE) + ELSE() + SET(_configuration) + ENDIF() - IF(_test MATCHES debug) - SET(_configuration DEBUG) - ELSEIF(_test MATCHES release) - SET(_configuration RELEASE) - ELSE() - SET(_configuration) + STRING(REGEX REPLACE "\\..*" "." _test ${_test}) + DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration}) ENDIF() - STRING(REGEX REPLACE "\\..*" "." _test ${_test}) - DEAL_II_ADD_TEST(${_category} ${_test} ${_configuration}) ENDFOREACH() + ENDMACRO()