From eb5bed3f1bb84c8a46ad584c1451bf9b0ba043fa Mon Sep 17 00:00:00 2001 From: maier Date: Thu, 11 Jul 2013 14:39:34 +0000 Subject: [PATCH] Resolve a cache invalidation issue git-svn-id: https://svn.dealii.org/trunk@29967 0785d39b-7218-0410-832d-ea1e28bc413d --- .../cmake/configure/configure_1_lapack.cmake | 39 ++++++++++++------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/deal.II/cmake/configure/configure_1_lapack.cmake b/deal.II/cmake/configure/configure_1_lapack.cmake index 00f92171e7..5dbd35c580 100644 --- a/deal.II/cmake/configure/configure_1_lapack.cmake +++ b/deal.II/cmake/configure/configure_1_lapack.cmake @@ -19,20 +19,6 @@ MACRO(FEATURE_LAPACK_FIND_EXTERNAL var) FIND_PACKAGE(LAPACK) - # - # 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(NOT m_lib MATCHES "-NOTFOUND") - LIST(APPEND LAPACK_LIBRARIES ${m_lib}) - ENDIF() - - ENABLE_IF_LINKS(LAPACK_LINKER_FLAGS "-lgfortran") - ENABLE_IF_LINKS(LAPACK_LINKER_FLAGS "-lquadmath") - IF(LAPACK_FOUND) MARK_AS_ADVANCED( atlas_LIBRARY @@ -85,6 +71,14 @@ MACRO(RESET_LAPACK_FUNCTIONS_CACHE) ENDFOREACH() ENDMACRO() +# +# Resolve a cache invalidation problem by searching for this flag +# unconditionally. It is used in FEATURE_LAPACK_CONFIGURE_EXTERNAL +# depending on cached variables. +# +ENABLE_IF_LINKS(_dummy "-lgfortran") +ENABLE_IF_LINKS(_dummy "-lquadmath") + MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL) # @@ -105,10 +99,25 @@ MACRO(FEATURE_LAPACK_CONFIGURE_EXTERNAL) LIST(APPEND LAPACK_LIBRARIES ${BLAS_LIBRARIES}) ENDIF() + + # + # 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(NOT m_lib MATCHES "-NOTFOUND") + LIST(APPEND LAPACK_LIBRARIES ${m_lib}) + ENDIF() + + ENABLE_IF_LINKS(LAPACK_LINKER_FLAGS "-lgfortran") + ENABLE_IF_LINKS(LAPACK_LINKER_FLAGS "-lquadmath") + + ADD_FLAGS(CMAKE_SHARED_LINKER_FLAGS "${LAPACK_LINKER_FLAGS}") LIST(APPEND DEAL_II_EXTERNAL_LIBRARIES ${LAPACK_LIBRARIES}) - CHECK_FOR_LAPACK_FUNCTIONS() ENDMACRO() -- 2.39.5