CMakeLists.txt 1.43 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
set(SPACE_DIM 2 CACHE STRING "SPACE_DIM")
niklas.baumgarten's avatar
niklas.baumgarten committed
5
set(USE_FFTW ON CACHE STRING "USE_FFTW")
6
set(USE_SPLITTED_COMMS ON CACHE STRING "USE_SPLITTED_COMMS")
7
set(USE_SPACETIME OFF CACHE STRING "USE_SPACETIME")
niklas.baumgarten's avatar
niklas.baumgarten committed
8
9
#set(COMPILER_OPTIMIZE -O0 CACHE STRING "COMPILER_OPTIMIZE")
set(COMPILER_OPTIMIZE -O3 CACHE STRING "COMPILER_OPTIMIZE")
niklas.baumgarten's avatar
niklas.baumgarten committed
10
11
12
13
set(NO_DEPRECATED OFF CACHE STRING "NO_DEPRECATED")
set(AFFINE_LINEAR_TRAFO ON CACHE STRING "AFFINE_LINEAR_TRAFO")
set(BUILD_TESTS OFF CACHE STRING "BUILD_TESTS")
set(BUILD_MLMC_TESTS ON CACHE STRING "BUILD_MLMC_TESTS")
niklas.baumgarten's avatar
niklas.baumgarten committed
14
#---------------------------------------------------------------------------------------#
niklas.baumgarten's avatar
niklas.baumgarten committed
15

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

niklas.baumgarten's avatar
niklas.baumgarten committed
19
20
21
22
# 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
23

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

niklas.baumgarten's avatar
niklas.baumgarten committed
28
# Include directories -> Todo move to kernel
niklas.baumgarten's avatar
niklas.baumgarten committed
29
30
include_directories(${PROJECT_SOURCE_DIR}/sprng5/include)

niklas.baumgarten's avatar
niklas.baumgarten committed
31
# Subdirectories
niklas.baumgarten's avatar
niklas.baumgarten committed
32
add_mpp_subdirectory(${PROJECT_SOURCE_DIR}/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