From 07e1abbbcd892f6bfc111b52c9ed36d5712072c9 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 11 Dec 2022 00:07:33 -0600 Subject: [PATCH] CMake: move a macro definition to the proper file --- cmake/macros/macro_deal_ii_add_test.cmake | 15 +++++++++++++++ cmake/macros/macro_deal_ii_pickup_tests.cmake | 12 +----------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/cmake/macros/macro_deal_ii_add_test.cmake b/cmake/macros/macro_deal_ii_add_test.cmake index 363532718d..6f9d64d344 100644 --- a/cmake/macros/macro_deal_ii_add_test.cmake +++ b/cmake/macros/macro_deal_ii_add_test.cmake @@ -103,6 +103,21 @@ # deal_ii_add_test(category test_name comparison_file) # +# +# A small helper macro that is used below: +# + +macro(item_matches _var _regex) + set(${_var}) + foreach (_item ${ARGN}) + if("${_item}" MATCHES ${_regex}) + set(${_var} TRUE) + break() + endif() + endforeach() +endmacro() + + function(deal_ii_add_test _category _test_name _comparison_file) if(NOT TARGET compile_test_executables) diff --git a/cmake/macros/macro_deal_ii_pickup_tests.cmake b/cmake/macros/macro_deal_ii_pickup_tests.cmake index d70f926194..8e906e6a97 100644 --- a/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -74,7 +74,7 @@ # # -# Two very small macros that are used below: +# A small helper macro that is used below: # macro(set_if_empty _variable) @@ -83,16 +83,6 @@ macro(set_if_empty _variable) endif() endmacro() -macro(item_matches _var _regex) - set(${_var}) - foreach (_item ${ARGN}) - if("${_item}" MATCHES ${_regex}) - set(${_var} TRUE) - break() - endif() - endforeach() -endmacro() - macro(deal_ii_pickup_tests) -- 2.39.5