CMakeLists.txt 1.36 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

niklas.baumgarten's avatar
niklas.baumgarten committed
4
5
6
7
8
9
10
11
12
set(SPACE_DIM 2 CACHE STRING "SPACE_DIM")
set(TIME_DIM 0 CACHE STRING "TIME_DIM")
set(COMPILER_OPTIMIZE -O0 CACHE STRING "COMPILER_OPTIMIZE")
set(NO_DEPRECATED OFF CACHE STRING "NO_DEPRECATED")
set(AFFINE_LINEAR_TRAFO ON CACHE STRING "AFFINE_LINEAR_TRAFO")
set(USE_CXSC OFF CACHE STRING "USE_CXSC")
set(BUILD_TESTS OFF CACHE STRING "BUILD_TESTS")
set(BUILD_IA_TESTS OFF CACHE STRING "BUILD_IA_TESTS")
set(BUILD_MLMC_TESTS ON CACHE STRING "BUILD_MLMC_TESTS")
niklas.baumgarten's avatar
niklas.baumgarten committed
13
#---------------------------------------------------------------------------------------#
niklas.baumgarten's avatar
niklas.baumgarten committed
14

niklas.baumgarten's avatar
niklas.baumgarten committed
15
16
# include M++
include(mpp/CMakeLists.txt)
niklas.baumgarten's avatar
niklas.baumgarten committed
17

niklas.baumgarten's avatar
niklas.baumgarten committed
18
19
20
21
# Manage folder structure build folder
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/data/py)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/data/vtk)
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/data/vtu)
niklas.baumgarten's avatar
niklas.baumgarten committed
22

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

niklas.baumgarten's avatar
niklas.baumgarten committed
27
28
29
30
# Include directories
include_directories(${PROJECT_SOURCE_DIR}/sprng5/include)
include_directories(${PROJECT_SOURCE_DIR}/mlmc/src)

niklas.baumgarten's avatar
niklas.baumgarten committed
31
# Subdirectories
niklas.baumgarten's avatar
niklas.baumgarten committed
32
add_subdirectory(mlmc/src)
niklas.baumgarten's avatar
niklas.baumgarten committed
33

niklas.baumgarten's avatar
niklas.baumgarten committed
34
# Executables
niklas.baumgarten's avatar
niklas.baumgarten committed
35
add_executable(MLMC-M++ mlmc/src/Main.cpp)
niklas.baumgarten's avatar
niklas.baumgarten committed
36
37

# Linking
niklas.baumgarten's avatar
niklas.baumgarten committed
38
target_link_libraries(MLMC-M++ MONTECARLO)
niklas.baumgarten's avatar
niklas.baumgarten committed
39
40
41

# Tests
if (BUILD_MLMC_TESTS)
niklas.baumgarten's avatar
niklas.baumgarten committed
42
    include_directories(mlmc/tests/)
niklas.baumgarten's avatar
niklas.baumgarten committed
43
    add_subdirectory(mlmc/tests/)
niklas.baumgarten's avatar
niklas.baumgarten committed
44
endif ()
niklas.baumgarten's avatar
niklas.baumgarten committed
45
46
47
48
49