From: Matthias Maier Date: Mon, 3 Feb 2020 02:29:50 +0000 (-0600) Subject: CMake: Make TEST_PICKUP_REGEX stricter X-Git-Tag: v9.2.0-rc1~580^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9469%2Fhead;p=dealii.git 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 --- 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)