]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Make TEST_PICKUP_REGEX stricter 9469/head
authorMatthias Maier <tamiko@43-1.org>
Mon, 3 Feb 2020 02:29:50 +0000 (20:29 -0600)
committerMatthias Maier <tamiko@43-1.org>
Mon, 3 Feb 2020 02:29:50 +0000 (20:29 -0600)
When applying TEST_PICKUP_REGEX we now only match against
"${category}/${basename}" of a test (excluding all configuration options
after the first period (".").

Closes #9420

cmake/macros/macro_deal_ii_pickup_tests.cmake

index 085ec637a5e52372b346a882afbce8afbbba0c83..ad1727141412e175179f813832a60fa6d9315e91 100644 (file)
@@ -188,8 +188,13 @@ MACRO(DEAL_II_PICKUP_TESTS)
     # Respect TEST_PICKUP_REGEX:
     #
 
+    #
+    # Only retain the base name of the test, i.e., remove everything after
+    # (and including) the first period ("."):
+    #
+    STRING(REGEX REPLACE "\\..*$" "" _regex_name "${_category}/${_test}")
     IF( "${TEST_PICKUP_REGEX}" STREQUAL "" OR
-        "${_category}/${_test}" MATCHES "${TEST_PICKUP_REGEX}" )
+        "${_regex_name}" MATCHES "${TEST_PICKUP_REGEX}" )
       SET(_define_test TRUE)
     ELSE()
       SET(_define_test FALSE)

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.