-
Notifications
You must be signed in to change notification settings - Fork 54
/
Copy pathFindArpack.cmake
48 lines (41 loc) · 1.77 KB
/
FindArpack.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# ----------------------------------------------------------------------------
# XC program; finite element analysis code
# for structural analysis and design.
#
# Copyright (C) Luis C. Pérez Tato
#
# Except for the restrictions that may arise from the copyright
# of the original program (see copyright below if any)
# XC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#
# You should have received a copy of the GNU General Public License
# along with this program.
# If not, see <http:// www.gnu.org/licenses/>.
# ----------------------------------------------------------------------------
SET(ARPACK_SEARCH_PATHS ${CMAKE_SOURCE_DIR} /opt/local/lib/ ../ThirdParty/ARPACK)
FIND_LIBRARY(ARPACK_LIB NAMES arpack.1 arpack PATHS ${ARPACK_SEARCH_PATHS})
SET(ARPACK_FOUND FALSE)
IF (ARPACK_LIB)
SET(ARPACK_FOUND TRUE)
MARK_AS_ADVANCED(ARPACK_LIB)
ENDIF (ARPACK_LIB)
IF (ARPACK_FOUND)
IF (NOT ARPACK_LIB_FIND_QUIETLY)
MESSAGE(STATUS "Found Arpack: ${ARPACK_LIB}")
GET_FILENAME_COMPONENT(ARPACK_PATH ${ARPACK_LIB} PATH CACHE)
SET(ARPACK_INCLUDE_DIR ${ARPACK_PATH}/../include CACHE FILEPATH "ARPACK include directory.")
ENDIF (NOT ARPACK_LIB_FIND_QUIETLY)
ELSE(ARPACK_FOUND)
IF (ARPACK_LIB_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find Arpack")
ENDIF (ARPACK_LIB_FIND_REQUIRED)
ENDIF (ARPACK_FOUND)