From 13e358e410c8d60fd0255fa3d3851af1e21b753b Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 2 Feb 2020 20:29:50 -0600 Subject: [PATCH] CMake: Make TEST_PICKUP_REGEX stricter 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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake/macros/macro_deal_ii_pickup_tests.cmake b/cmake/macros/macro_deal_ii_pickup_tests.cmake index 085ec637a5..ad17271414 100644 --- a/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -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) -- 2.39.5