]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
CMake: Fix typo
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 4 Jun 2014 17:41:01 +0000 (17:41 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 4 Jun 2014 17:41:01 +0000 (17:41 +0000)
git-svn-id: https://svn.dealii.org/trunk@33013 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_filter_system_libraries.cmake
deal.II/cmake/modules/FindPETSC.cmake

index 9c73bc95bed9670412f83693cfbdf027f241aafe..35a015cd2d737ba0a95cb02fad808e2c8222a525 100644 (file)
@@ -33,7 +33,7 @@ MACRO(FILTER_SYSTEM_LIBRARIES _feature)
       SET(_tmp_${_variable} ${${_variable}})
       SET(${_variable} "")
       FOREACH(_lib ${_tmp_${_variable}})
-        IF(_lib MATCHES "lib(c|quadmath|gfortran|m|rt|nsl|dl|pthread|clang_rt|clang_rt.osx)\\.(a|so)$")
+        IF(_lib MATCHES "lib(c|quadmath|gfortran|m|rt|nsl|dl|pthread|clang_rt.*)\\.(a|so)$")
           string(REGEX REPLACE ".*lib([a-z]+).so$" "\\1" _lib ${_lib})
         ENDIF()
         LIST(APPEND ${_variable} ${_lib})
index 99edd238d598e7e13652ac7aad249599ada926a1..10de64d81b1c589ab48cc2d86e2977e0a93ac1a9 100644 (file)
@@ -174,12 +174,13 @@ IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")
 
   FILE(STRINGS "${PETSC_PETSCVARIABLES}" PETSC_EXTERNAL_LINK_LINE
     REGEX "^PETSC_WITH_EXTERNAL_LIB =.*")
+
   SEPARATE_ARGUMENTS(PETSC_EXTERNAL_LINK_LINE)
 
   SET(_hints)
   SET(_petsc_libraries)
   SET(_cleanup_variables)
-  FOREACH(_token ${PETSC_EXTERNAL_LINK_LINE}})
+  FOREACH(_token ${PETSC_EXTERNAL_LINK_LINE})
     IF(_token MATCHES "^-L")
       # Build up hints with the help of all tokens passed with -L:
       STRING(REGEX REPLACE "^-L" "" _token "${_token}")
@@ -188,21 +189,21 @@ IF(NOT PETSC_PETSCVARIABLES MATCHES "-NOTFOUND")
       # Search for every library that was specified with -l:
       STRING(REGEX REPLACE "^-l" "" _token "${_token}")
 
-      LIST(APPEND _cleanup_variables PETSC_LIBRARY_${_token})
+      IF(NOT _token MATCHES "(petsc|stdc\\+\\+|gcc_s)")
+        LIST(APPEND _cleanup_variables PETSC_LIBRARY_${_token})
 
-      IF(_token MATCHES "^(c|quadmath|gfortran|m|rt|nsl|dl|pthread|clang_rt|clang_rt.osx)$")
-        FIND_SYSTEM_LIBRARY(PETSC_LIBRARY_${_token} NAMES ${_token})
-        IF(NOT PETSC_LIBRARY_${_token} MATCHES "-NOTFOUND")
-          LIST(APPEND _petsc_libraries ${PETSC_LIBRARY_${_token}})
+        IF(_token MATCHES "^(c|quadmath|gfortran|m|rt|nsl|dl|pthread|clang_rt.*)$")
+          FIND_SYSTEM_LIBRARY(PETSC_LIBRARY_${_token} NAMES ${_token})
+        ELSE()
+          DEAL_II_FIND_LIBRARY(PETSC_LIBRARY_${_token}
+            NAMES ${_token}
+            HINTS ${_hints}
+            )
         ENDIF()
-      ELSEIF(NOT _token MATCHES "(petsc|stdc\\+\\+|gcc_s)")
-        DEAL_II_FIND_LIBRARY(PETSC_LIBRARY_${_token}
-          NAMES ${_token}
-          HINTS ${_hints}
-          )
         IF(NOT PETSC_LIBRARY_${_token} MATCHES "-NOTFOUND")
           LIST(APPEND _petsc_libraries ${PETSC_LIBRARY_${_token}})
         ENDIF()
+
       ENDIF()
 
     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.