1
# Fesslix - Stochastic Analysis
2
# Copyright (C) 2010-2016 Wolfgang Betz
4
# Fesslix is free software: you can redistribute it and/or modify
5
# it under the terms of the GNU General Public License as published by
6
# the Free Software Foundation, either version 3 of the License, or
7
# (at your option) any later version.
9
# Fesslix is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
# GNU General Public License for more details.
14
# You should have received a copy of the GNU General Public License
15
# along with Fesslix. If not, see <http://www.gnu.org/licenses/>.
19
cmake_minimum_required(VERSION 2.8)
21
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
23
find_package(Flxlib REQUIRED)
25
# add the automatically determined parts of the RPATH
26
# which point to directories outside the build tree to the install RPATH
27
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
29
if (NOT CMAKE_BUILD_TYPE)
30
set (CMAKE_BUILD_TYPE Release CACHE STRING
31
"Choose the type of build, options are: None Debug Release."
33
endif (NOT CMAKE_BUILD_TYPE)
37
if(DEFINED ENV{DEB_BUILD_ARCH_OS})
39
SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} -Wall)
43
option ( FLX_DEBUG "with debugging stuff .. but maybe more stable" OFF )
44
option ( FLX_DEBUG_COUT "use std::cout for debugging in your code" OFF )
48
option ( FLX_INSTALL_HEADERS "install the header files of Fesslix" ON )
50
option ( FLX_INSTALL_HEADERS "install the header files of Fesslix" OFF )
54
#===================================================================================
56
#===================================================================================
58
if(DEFINED ENV{BOOST_INCDIR})
59
set(BOOST_INCLUDEDIR $ENV{BOOST_INCDIR})
62
find_package(Boost 1.48.0 REQUIRED)
65
#===================================================================================
67
#===================================================================================
70
if(NOT("${CMAKE_VERSION}" LESS 3.2))
74
option ( FLX_USE_GSL "compile with GSL support" ON )
78
#===================================================================================
80
#===================================================================================
85
option ( FLX_USE_ARPACK "compile with arpack support" ON )
87
option ( FLX_USE_ARPACK "compile with arpack support" OFF )
90
set ( FLX_USE_ARPACK "OFF" )
100
#===================================================================================
101
# info for config.h - header
102
#===================================================================================
105
if("${FLX_USE_ARPACK}" STREQUAL "ON")
106
set ( FLX_USE_ARPACKb 1 )
107
else("${FLX_USE_ARPACK}" STREQUAL "ON")
108
set ( FLX_USE_ARPACKb 0 )
109
endif("${FLX_USE_ARPACK}" STREQUAL "ON")
111
set ( FLX_USE_ARPACKb 0 )
114
if("${FLX_USE_GSL}" STREQUAL "ON")
115
set ( FLX_USE_GSLb 1 )
116
else("${FLX_USE_GSL}" STREQUAL "ON")
117
set ( FLX_USE_GSLb 0 )
118
endif("${FLX_USE_GSL}" STREQUAL "ON")
121
if("${FLX_DEBUG}" STREQUAL "ON")
123
else("${FLX_DEBUG}" STREQUAL "ON")
125
endif("${FLX_DEBUG}" STREQUAL "ON")
126
if("${FLX_DEBUG_COUT}" STREQUAL "ON")
127
set ( FLX_DEBUG_COUTb 1 )
128
else("${FLX_DEBUG_COUT}" STREQUAL "ON")
129
set ( FLX_DEBUG_COUTb 0 )
130
endif("${FLX_DEBUG_COUT}" STREQUAL "ON")
135
set ( FLX_LIB_LINKstat SHARED)
138
add_subdirectory(src)