]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: *sigh*
authorMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 1 Apr 2013 08:26:59 +0000 (08:26 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Mon, 1 Apr 2013 08:26:59 +0000 (08:26 +0000)
git-svn-id: https://svn.dealii.org/trunk@29133 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/configure/configure_1_lapack.cmake

index 9f42e5da4020f327a04deaba19d920e927ec4776..6edae73c7e4ca1809eb08643e7573da31a27a29a 100644 (file)
@@ -48,6 +48,15 @@ SET(DEAL_II_LAPACK_FUNCTIONS
 
 MACRO(CHECK_FOR_LAPACK_FUNCTIONS)
   SET(CMAKE_REQUIRED_LIBRARIES ${LAPACK_LIBRARIES})
+  #
+  # For some static lapack versions it is necessary to link with -lm.
+  # So link with it as well if -lm is already present in our link
+  # interface:
+  #
+  IF(NOT m_lib MATCHES "-NOTFOUND")
+    LIST(APPEND CMAKE_REQUIRED_LIBRARIES ${m_lib})
+  ENDIF()
+
   ADD_FLAGS(CMAKE_REQUIRED_FLAGS "${LAPACK_LINKER_FLAGS}")
 
   FOREACH(_func ${DEAL_II_LAPACK_FUNCTIONS})

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.