From: Matthias Maier Date: Sat, 31 Jan 2015 17:54:14 +0000 (+0100) Subject: CMake: Bugfix: Only set up parpack if deal.II is configured with mpi support X-Git-Tag: v8.3.0-rc1~510^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=616a403d8f799a21b7d306ecf38f3c73d0857524;p=dealii.git CMake: Bugfix: Only set up parpack if deal.II is configured with mpi support --- diff --git a/cmake/modules/FindARPACK.cmake b/cmake/modules/FindARPACK.cmake index 509f490ce7..b15a4c722a 100644 --- a/cmake/modules/FindARPACK.cmake +++ b/cmake/modules/FindARPACK.cmake @@ -1,6 +1,6 @@ ## --------------------------------------------------------------------- ## -## Copyright (C) 2012 - 2014 by the deal.II authors +## Copyright (C) 2012 - 2015 by the deal.II authors ## ## This file is part of the deal.II library. ## @@ -23,10 +23,6 @@ # ARPACK_WITH_PARPACK # -# -# TODO: ARPACK and mpi... -# - SET(ARPACK_DIR "" CACHE PATH "An optional hint to an ARPACK installation") SET_IF_EMPTY(ARPACK_DIR "$ENV{ARPACK_DIR}") @@ -36,21 +32,25 @@ DEAL_II_FIND_LIBRARY(ARPACK_LIBRARY PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib ) -# -# 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 - ) +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 + ) +ELSE() + SET(PARPACK_LIBRARY "PARPACK_LIBRARY-NOTFOUND") +ENDIF() IF(NOT PARPACK_LIBRARY MATCHES "-NOTFOUND") SET(ARPACK_WITH_PARPACK TRUE) @@ -58,9 +58,8 @@ ELSE() SET(ARPACK_WITH_PARPACK FALSE) ENDIF() - DEAL_II_PACKAGE_HANDLE(ARPACK - LIBRARIES + LIBRARIES OPTIONAL PARPACK_LIBRARY REQUIRED ARPACK_LIBRARY LAPACK_LIBRARIES OPTIONAL MPI_C_LIBRARIES