From 3e9e1170b6dafdc1cc53de5180d26484305a314a Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 6 Oct 2013 20:00:42 +0000 Subject: [PATCH] Bugfix: Pick up the Fortran interface for lapack correctly git-svn-id: https://svn.dealii.org/branches/branch_port_the_testsuite@31154 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/modules/FindDEALII_LAPACK.cmake | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/deal.II/cmake/modules/FindDEALII_LAPACK.cmake b/deal.II/cmake/modules/FindDEALII_LAPACK.cmake index b1c7630265..be470cec36 100644 --- a/deal.II/cmake/modules/FindDEALII_LAPACK.cmake +++ b/deal.II/cmake/modules/FindDEALII_LAPACK.cmake @@ -88,18 +88,23 @@ IF(LAPACK_FOUND) # Well, in case of static archives we have to manually pick up the # complete link interface. *sigh* # - # Do this unconditionally for the most common case: - # TODO: Non-GNU setups... + # If CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES is not available, do it + # unconditionally for the most common case (gfortran). # # Switch the library preference back to prefer dynamic libraries if # DEAL_II_PREFER_STATIC_LIBS=TRUE but DEAL_II_STATIC_EXECUTABLE=FALSE. In # this case system libraries should be linked dynamically. # + SET(_fortran_libs ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) + SET_IF_EMPTY(_fortran_libs gfortran m quadmath c) + SWITCH_LIBRARY_PREFERENCE() - FOREACH(_lib gfortran m quadmath) + FOREACH(_lib ${_fortran_libs}) FIND_LIBRARY(${_lib}_LIBRARY NAMES ${_lib} - HINTS ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) + HINTS + ${CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES} + ${CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES}) MARK_AS_ADVANCED(${_lib}_LIBRARY) IF(NOT ${_lib}_LIBRARY MATCHES "-NOTFOUND") -- 2.39.5