From: Matthias Maier <tamiko@43-1.org>
Date: Mon, 6 Dec 2021 23:45:33 +0000 (-0600)
Subject: Bugfix: Drop out of the right loop, annotate logic
X-Git-Tag: v9.4.0-rc1~768^2
X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13019%2Fhead;p=dealii.git

Bugfix: Drop out of the right loop, annotate logic
---

diff --git a/cmake/macros/macro_deal_ii_pickup_tests.cmake b/cmake/macros/macro_deal_ii_pickup_tests.cmake
index 9803eac172..4a1ef85f73 100644
--- a/cmake/macros/macro_deal_ii_pickup_tests.cmake
+++ b/cmake/macros/macro_deal_ii_pickup_tests.cmake
@@ -256,6 +256,7 @@ MACRO(DEAL_II_PICKUP_TESTS)
           # given test
           #
           SET(_skip_test TRUE)
+          CONTINUE() # drop out of "FOREACH(_match ${_matches})"
         ENDIF()
       ENDIF()
 
@@ -275,13 +276,10 @@ Comparison operator \"=\" expected for boolean match.\n"
         IF( (${_variable} AND NOT ${_boolean}) OR
             (NOT ${_variable} AND ${_boolean}) )
           SET(_skip_test TRUE)
+          CONTINUE() # drop out of "FOREACH(_match ${_matches})"
         ENDIF()
       ENDIF()
 
-      IF(_skip_test)
-        CONTINUE()   # next test
-      ENDIF()
-
       #
       # Process version constraints:
       #
@@ -298,11 +296,16 @@ Comparison operator \"=\" expected for boolean match.\n"
               "${DEAL_II_${_feature}_VERSION}" VERSION_LESS "${_version}" ) OR
             ( "${_operator}" STREQUAL ".leq." AND
               "${DEAL_II_${_feature}_VERSION}" VERSION_GREATER "${_version}" ) )
-          CONTINUE()   # next test
+          SET(_skip_test TRUE)
+          CONTINUE() # drop out of "FOREACH(_match ${_matches})"
         ENDIF()
       ENDIF()
     ENDFOREACH()
 
+    IF(_skip_test)
+      CONTINUE() # next test
+    ENDIF()
+
     #
     # We've made it all the way to here, which means that we actually
     # want to define the test