From 31b12fbfc08d552feef608a5d5d7200da00ba0fc Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 13 May 2020 17:54:10 -0500 Subject: [PATCH] CMake: relax arpack and parpack library directory requirements Some Linux distributions install the parallel libparpack.so* component in an MPI vendor specific directory different from the location of the serial libarpack.so* library. We can thus not assume that both are located in the same directory. Closes: #10197 --- cmake/modules/FindARPACK.cmake | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/cmake/modules/FindARPACK.cmake b/cmake/modules/FindARPACK.cmake index 21c1466b62..b5cad285ed 100644 --- a/cmake/modules/FindARPACK.cmake +++ b/cmake/modules/FindARPACK.cmake @@ -26,6 +26,9 @@ SET(ARPACK_DIR "" CACHE PATH "An optional hint to an ARPACK installation") SET_IF_EMPTY(ARPACK_DIR "$ENV{ARPACK_DIR}") +SET(PARPACK_DIR "" CACHE PATH "An optional hint to a PARPACK installation") +SET_IF_EMPTY(PARPACK_DIR "$ENV{PARPACK_DIR}") + DEAL_II_FIND_LIBRARY(ARPACK_LIBRARY NAMES arpack HINTS ${ARPACK_DIR} @@ -33,20 +36,11 @@ DEAL_II_FIND_LIBRARY(ARPACK_LIBRARY ) IF(DEAL_II_WITH_MPI) - # - # Sanity check: Only search the parpack library in the same directory as - # the arpack library... - # GET_FILENAME_COMPONENT(_path "${ARPACK_LIBRARY}" PATH) DEAL_II_FIND_LIBRARY(PARPACK_LIBRARY NAMES parpack - HINTS ${_path} - NO_DEFAULT_PATH - NO_CMAKE_ENVIRONMENT_PATH - NO_CMAKE_PATH - NO_SYSTEM_ENVIRONMENT_PATH - NO_CMAKE_SYSTEM_PATH - NO_CMAKE_FIND_ROOT_PATH + HINTS ${_path} ${ARPACK_DIR} ${PARPACK_DIR} + PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib ) ELSE() SET(PARPACK_LIBRARY "PARPACK_LIBRARY-NOTFOUND") -- 2.39.5