From ba334d1e806d2c089938d8b04bcdb8e1510efcee Mon Sep 17 00:00:00 2001 From: maier Date: Sat, 13 Jul 2013 11:00:50 +0000 Subject: [PATCH] CMake: Don't forget to guard librt as well git-svn-id: https://svn.dealii.org/trunk@29992 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/modules/FindUMFPACK.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/deal.II/cmake/modules/FindUMFPACK.cmake b/deal.II/cmake/modules/FindUMFPACK.cmake index fc512a52f3..68f418bf42 100644 --- a/deal.II/cmake/modules/FindUMFPACK.cmake +++ b/deal.II/cmake/modules/FindUMFPACK.cmake @@ -146,10 +146,12 @@ IF(UMFPACK_FOUND) # lib does not record its dependence on librt.so as evidenced # by ldd :-( ): # - FIND_LIBRARY(rt_lib NAMES rt) - MARK_AS_ADVANCED(rt_lib) - IF(NOT rt_lib MATCHES "-NOTFOUND") - LIST(APPEND UMFPACK_LIBRARIES ${rt_lib}) + SWITCH_LIBRARY_PREFERENCE() + FIND_LIBRARY(rt_LIBRARY NAMES rt) + SWITCH_LIBRARY_PREFERENCE() + MARK_AS_ADVANCED(rt_LIBRARY) + IF(NOT rt_LIBRARY MATCHES "-NOTFOUND") + LIST(APPEND UMFPACK_LIBRARIES ${rt_LIBRARY}) ENDIF() SET(UMFPACK_INCLUDE_DIRS -- 2.39.5