]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix: Pick up the Fortran interface for lapack correctly
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 6 Oct 2013 20:00:42 +0000 (20:00 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 6 Oct 2013 20:00:42 +0000 (20:00 +0000)
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

index b1c7630265d3687f3c1de6959203882bbabd98da..be470cec36a9a63ad17f3a259ba113b500f1000c 100644 (file)
@@ -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")

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.