]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Support prefixed module names for Trilinos
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Mar 2013 22:21:55 +0000 (22:21 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 8 Mar 2013 22:21:55 +0000 (22:21 +0000)
git-svn-id: https://svn.dealii.org/trunk@28826 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_trilinos.cmake
deal.II/cmake/macros/macro_item_matches.cmake [moved from deal.II/cmake/macros/macro_list_contains.cmake with 69% similarity]

index 60cea8413bf8a2e94d230fcb79e5149e1a2a4ab4..9709268db1ec7c9657a57a14ac1ccbcf4d929e2a 100644 (file)
@@ -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()
similarity index 69%
rename from deal.II/cmake/macros/macro_list_contains.cmake
rename to deal.II/cmake/macros/macro_item_matches.cmake
index 6449704785114b28879c285e5ff24b7d4bcd88b8..748661a2e6366261a1ff7c1c674ba5620baaa3a6 100644 (file)
 # 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()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.