]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: relax arpack and parpack library directory requirements 10201/head
authorMatthias Maier <tamiko@43-1.org>
Wed, 13 May 2020 22:54:10 +0000 (17:54 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 13 May 2020 22:54:10 +0000 (17:54 -0500)
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

index 21c1466b62fc8da732ebcc0f0dd958521452ff57..b5cad285ed1f9b163b8fb20c50f8129974043406 100644 (file)
@@ -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")

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.