From: maier Date: Fri, 8 Mar 2013 22:21:55 +0000 (+0000) Subject: CMake: Support prefixed module names for Trilinos X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2bec428355987f5f91a0879c50c2817b7ac06c1;p=dealii-svn.git CMake: Support prefixed module names for Trilinos git-svn-id: https://svn.dealii.org/trunk@28826 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/configure/configure_trilinos.cmake b/deal.II/cmake/configure/configure_trilinos.cmake index 60cea8413b..9709268db1 100644 --- a/deal.II/cmake/configure/configure_trilinos.cmake +++ b/deal.II/cmake/configure/configure_trilinos.cmake @@ -36,7 +36,7 @@ MACRO(FEATURE_TRILINOS_FIND_EXTERNAL var) FOREACH(_module amesos epetra ifpack aztecoo sacado teuchos ) - LIST_CONTAINS(_module_found ${_module} ${Trilinos_LIBRARIES}) + ITEM_MATCHES(_module_found ${_module}$ ${Trilinos_LIBRARIES}) IF(_module_found) MESSAGE(STATUS "Found ${_module}") ELSE() diff --git a/deal.II/cmake/macros/macro_list_contains.cmake b/deal.II/cmake/macros/macro_item_matches.cmake similarity index 69% rename from deal.II/cmake/macros/macro_list_contains.cmake rename to deal.II/cmake/macros/macro_item_matches.cmake index 6449704785..748661a2e6 100644 --- a/deal.II/cmake/macros/macro_list_contains.cmake +++ b/deal.II/cmake/macros/macro_item_matches.cmake @@ -16,16 +16,15 @@ # A small macro to test whether a given list contains an element. # # Usage: -# LIST_CONTAINS(var value list) +# ITEM_MATCHES(var regex list) # -# var is set to true if list contains value as an element compared via -# STREQUAL. +# var is set to true if list contains an item that matches regex. # -MACRO(LIST_CONTAINS _var _value) +MACRO(ITEM_MATCHES _var _regex) SET(${_var}) - FOREACH (_value2 ${ARGN}) - IF("${_value}" STREQUAL "${_value2}") + FOREACH (_item ${ARGN}) + IF("${_item}" MATCHES ${_regex}) SET(${_var} TRUE) BREAK() ENDIF()