From: Matthias Maier Date: Wed, 4 Jun 2014 17:41:01 +0000 (+0000) Subject: CMake: Fix typo X-Git-Tag: v8.2.0-rc1~420 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7837e9cd021fc33b93d63dd403d7bfd340958d93;p=dealii.git CMake: Fix typo git-svn-id: https://svn.dealii.org/trunk@33013 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/macros/macro_filter_system_libraries.cmake b/deal.II/cmake/macros/macro_filter_system_libraries.cmake index 9c73bc95be..35a015cd2d 100644 --- a/deal.II/cmake/macros/macro_filter_system_libraries.cmake +++ b/deal.II/cmake/macros/macro_filter_system_libraries.cmake @@ -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}) diff --git a/deal.II/cmake/modules/FindPETSC.cmake b/deal.II/cmake/modules/FindPETSC.cmake index 99edd238d5..10de64d81b 100644 --- a/deal.II/cmake/modules/FindPETSC.cmake +++ b/deal.II/cmake/modules/FindPETSC.cmake @@ -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()