From: Matthias Maier Date: Wed, 13 May 2020 22:54:10 +0000 (-0500) Subject: CMake: relax arpack and parpack library directory requirements X-Git-Tag: v9.3.0-rc1~1639^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31b12fbfc08d552feef608a5d5d7200da00ba0fc;p=dealii.git 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 --- 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")