From f410e6f21d7c4bfc71f4491abbe6b61ab35983d5 Mon Sep 17 00:00:00 2001 From: maier Date: Mon, 1 Apr 2013 08:26:59 +0000 Subject: [PATCH] CMake: *sigh* git-svn-id: https://svn.dealii.org/trunk@29133 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/configure/configure_1_lapack.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deal.II/cmake/configure/configure_1_lapack.cmake b/deal.II/cmake/configure/configure_1_lapack.cmake index 9f42e5da40..6edae73c7e 100644 --- a/deal.II/cmake/configure/configure_1_lapack.cmake +++ b/deal.II/cmake/configure/configure_1_lapack.cmake @@ -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}) -- 2.39.5