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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
|
# Fesslix - Stochastic Analysis
# Copyright (C) 2010-2018 Wolfgang Betz
#
# Fesslix 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.
#
# Fesslix 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 Fesslix. If not, see <http://www.gnu.org/licenses/>.
project(flxeigen)
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(Flxlib REQUIRED)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release."
FORCE)
endif (NOT CMAKE_BUILD_TYPE)
if(UNIX)
if(DEFINED ENV{DEB_BUILD_ARCH_OS})
else()
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall)
endif()
endif(UNIX)
option ( FLX_DEBUG "with debugging stuff .. but maybe more stable" OFF )
option ( FLX_DEBUG_COUT "use std::cout for debugging in your code" OFF )
if(WIN32)
option ( FLX_INSTALL_HEADERS "install the header files of Fesslix" ON )
else()
option ( FLX_INSTALL_HEADERS "install the header files of Fesslix" OFF )
endif()
#===================================================================================
# Boost library
#===================================================================================
if(DEFINED ENV{BOOST_INCDIR})
set(BOOST_INCLUDEDIR $ENV{BOOST_INCDIR})
endif()
find_package(Boost 1.48.0 REQUIRED)
#===================================================================================
# GSL library
#===================================================================================
if(NOT("${CMAKE_VERSION}" LESS 3.2))
FIND_PACKAGE(GSL)
endif()
option ( FLX_USE_GSL "compile with GSL support" ON )
#===================================================================================
# ARPACK library
#===================================================================================
if(UNIX)
FIND_PACKAGE(ARPACK)
if (ARPACK_FOUND)
option ( FLX_USE_ARPACK "compile with arpack support" ON )
else()
option ( FLX_USE_ARPACK "compile with arpack support" OFF )
endif()
else(UNIX)
set ( FLX_USE_ARPACK "OFF" )
endif(UNIX)
MARK_AS_ADVANCED(
FLX_DEBUG_COUT
)
#===================================================================================
# info for config.h - header
#===================================================================================
if(UNIX)
if("${FLX_USE_ARPACK}" STREQUAL "ON")
set ( FLX_USE_ARPACKb 1 )
else("${FLX_USE_ARPACK}" STREQUAL "ON")
set ( FLX_USE_ARPACKb 0 )
endif("${FLX_USE_ARPACK}" STREQUAL "ON")
else(UNIX)
set ( FLX_USE_ARPACKb 0 )
endif(UNIX)
if("${FLX_USE_GSL}" STREQUAL "ON")
set ( FLX_USE_GSLb 1 )
else("${FLX_USE_GSL}" STREQUAL "ON")
set ( FLX_USE_GSLb 0 )
endif("${FLX_USE_GSL}" STREQUAL "ON")
if("${FLX_DEBUG}" STREQUAL "ON")
set ( FLX_DEBUGb 1 )
else("${FLX_DEBUG}" STREQUAL "ON")
set ( FLX_DEBUGb 0 )
endif("${FLX_DEBUG}" STREQUAL "ON")
if("${FLX_DEBUG_COUT}" STREQUAL "ON")
set ( FLX_DEBUG_COUTb 1 )
else("${FLX_DEBUG_COUT}" STREQUAL "ON")
set ( FLX_DEBUG_COUTb 0 )
endif("${FLX_DEBUG_COUT}" STREQUAL "ON")
set ( FLX_LIB_LINKstat SHARED)
add_subdirectory(src)
|