From 8e5db6aab1e5acabfd002c0723542eb5ee9e9364 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Tue, 25 Aug 2015 22:55:35 -0500 Subject: [PATCH] small cleanup --- cmake/macros/macro_deal_ii_pickup_tests.cmake | 35 ++++++++----------- doc/developers/testsuite.html | 2 +- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/cmake/macros/macro_deal_ii_pickup_tests.cmake b/cmake/macros/macro_deal_ii_pickup_tests.cmake index 1ba3844c2d..f8730ff37a 100644 --- a/cmake/macros/macro_deal_ii_pickup_tests.cmake +++ b/cmake/macros/macro_deal_ii_pickup_tests.cmake @@ -152,7 +152,7 @@ MACRO(DEAL_II_PICKUP_TESTS) # STRING(REGEX MATCHALL - "compiler=([a-z]|[A-Z])*(>=|<=|=|>|<)(on|off|yes|no|true|false|[0-9]+(\\.[0-9]+)*)" _matches ${_test} + "compiler=[a-zA-Z]*(>=|<=|=|>|<)(on|off|yes|no|true|false|[0-9]+(\\.[0-9]+)*)" _matches ${_test} ) FOREACH(_match ${_matches}) @@ -161,10 +161,9 @@ MACRO(DEAL_II_PICKUP_TESTS) # (a possible) version number from the feature constraint: # STRING(REGEX REPLACE - "^compiler=(([a-z]|[A-Z])*)(=|>=|<=|<).*$" "\\1" - _compiler ${_match} + "^compiler=([a-zA-Z]*)(=|>=|<=|>|<).*$" "\\1" _compiler ${_match} ) - STRING(REGEX REPLACE "^compiler=(([a-z]|[A-Z])*)(>=|<=|=|>|<).*$" "\\3" _operator ${_match}) + STRING(REGEX REPLACE "^compiler=[a-zA-Z]*(>=|<=|=|>|<).*$" "\\1" _operator ${_match}) STRING(REGEX MATCH "(on|off|yes|no|true|false)$" _boolean ${_match}) STRING(REGEX MATCH "([0-9]+(\\.[0-9]+)*)$" _version ${_match}) @@ -269,22 +268,18 @@ Comparison operator \"=\" expected for boolean match.\n" # Process version constraints: # IF(NOT "${_version}" STREQUAL "") - IF(NOT ${DEAL_II_WITH_${_feature}}) - SET(_define_test FALSE) - ELSEIF( "${_operator}" STREQUAL "=" AND - NOT "${DEAL_II_${_feature}_VERSION}" VERSION_EQUAL "${_version}" ) - SET(_define_test FALSE) - ELSEIF( "${_operator}" STREQUAL ">" AND - NOT "${DEAL_II_${_feature}_VERSION}" VERSION_GREATER "${_version}" ) - SET(_define_test FALSE) - ELSEIF( "${_operator}" STREQUAL "<" AND - NOT "${DEAL_II_${_feature}_VERSION}" VERSION_LESS "${_version}" ) - SET(_define_test FALSE) - ELSEIF( "${_operator}" STREQUAL ">=" AND - "${DEAL_II_${_feature}_VERSION}" VERSION_LESS "${_version}" ) - SET(_define_test FALSE) - ELSEIF( "${_operator}" STREQUAL "<=" AND - "${DEAL_II_${_feature}_VERSION}" VERSION_GREATER "${_version}" ) + + IF( ( NOT ${DEAL_II_WITH_${_feature}} ) OR + ( "${_operator}" STREQUAL "=" AND + NOT "${DEAL_II_${_feature}_VERSION}" VERSION_EQUAL "${_version}" ) OR + ( "${_operator}" STREQUAL ">" AND + NOT "${DEAL_II_${_feature}_VERSION}" VERSION_GREATER "${_version}" ) OR + ( "${_operator}" STREQUAL "<" AND + NOT "${DEAL_II_${_feature}_VERSION}" VERSION_LESS "${_version}" ) OR + ( "${_operator}" STREQUAL ">=" AND + "${DEAL_II_${_feature}_VERSION}" VERSION_LESS "${_version}" ) OR + ( "${_operator}" STREQUAL "<=" AND + "${DEAL_II_${_feature}_VERSION}" VERSION_GREATER "${_version}" ) ) SET(_define_test FALSE) ENDIF() ENDIF() diff --git a/doc/developers/testsuite.html b/doc/developers/testsuite.html index 8900d8ba2f..ab59777e3f 100644 --- a/doc/developers/testsuite.html +++ b/doc/developers/testsuite.html @@ -468,7 +468,7 @@ category/test.compiler=Intel>=15.0.3.output

The third declaration is an example of how to specify a version - constraint: This tets will be set up if deal.II is configured with + constraint: This test will be set up if deal.II is configured with the Intel compiler version 15.0.3 or higher. The operators =, <, >, <=, >= are supported. -- 2.39.5