CMakeLists.txt 1.57 KB
Newer Older
niklas.baumgarten's avatar
niklas.baumgarten committed
1
cmake_minimum_required(VERSION 3.5.1)
niklas.baumgarten's avatar
niklas.baumgarten committed
2
project(MLMC)
niklas.baumgarten's avatar
niklas.baumgarten committed
3
4
#---------------------------------------------------------------------------------------#

niklas.baumgarten's avatar
niklas.baumgarten committed
5
#set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O0")
niklas.baumgarten's avatar
niklas.baumgarten committed
6
7
#set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O1")
#set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2")
niklas.baumgarten's avatar
niklas.baumgarten committed
8
#set(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3")
niklas.baumgarten's avatar
niklas.baumgarten committed
9

niklas.baumgarten's avatar
niklas.baumgarten committed
10
option(NO_DEPRECATED "Suppress deprecated warnings" OFF)
niklas.baumgarten's avatar
niklas.baumgarten committed
11

niklas.baumgarten's avatar
niklas.baumgarten committed
12
option(BUILD_TESTS "Build test executables" OFF)
niklas.baumgarten's avatar
niklas.baumgarten committed
13
14
15
16
17
18
19
20
21
22
23
24
25

option(USE_CXSC "Use interval arithmetic library cxsc" OFF)
option(PROBLEM_NO_TIME "Time independent problem" OFF)
option(PROBLEM_1D "1 dimensional problem" OFF)
option(PROBLEM_2D "2 dimensional problem" OFF)
option(USE_SUPERLU30 "Use SuperLU 3.0 (old version)" OFF)
option(AFFINE_LINEAR_TRAFO "Only affine linear transformations" OFF)

# Set path for mpp
set(PROJECT_MPP_DIR ${PROJECT_SOURCE_DIR}/mpp)

# Include settings for mpp
include(${PROJECT_MPP_DIR}/CMakeListsMpp.inc)
niklas.baumgarten's avatar
niklas.baumgarten committed
26

niklas.baumgarten's avatar
niklas.baumgarten committed
27
# Link libraries
niklas.baumgarten's avatar
niklas.baumgarten committed
28
#find_package(FFTW3 REQUIRED)   (Can't be found but still seems to link in)
niklas.baumgarten's avatar
niklas.baumgarten committed
29
link_directories(${PROJECT_SOURCE_DIR}/sprng5/lib)
niklas.baumgarten's avatar
niklas.baumgarten committed
30

niklas.baumgarten's avatar
niklas.baumgarten committed
31
32
33
34
# Include directories
include_directories(${PROJECT_SOURCE_DIR}/sprng5/include)
include_directories(${PROJECT_SOURCE_DIR}/mlmc/src)

niklas.baumgarten's avatar
niklas.baumgarten committed
35
36
# Subdirectories
add_subdirectory(mlmc/src)
niklas.baumgarten's avatar
niklas.baumgarten committed
37
add_subdirectory(mlmc/tests)
niklas.baumgarten's avatar
niklas.baumgarten committed
38
39
40
#---------------------------------------------------------------------------------------#

# Executables
niklas.baumgarten's avatar
niklas.baumgarten committed
41
add_executable(MLMC-M++ mlmc/src/Main.C)
niklas.baumgarten's avatar
niklas.baumgarten committed
42
43

# Linking
niklas.baumgarten's avatar
niklas.baumgarten committed
44
45
target_link_libraries(MLMC-M++ MLMC sprng SRC LIB_PS ${SUPERLU}
        ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES} fftw3 m)
niklas.baumgarten's avatar
niklas.baumgarten committed
46
#---------------------------------------------------------------------------------------#