-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathCMakeLists.txt
52 lines (35 loc) · 1.26 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.15)
project(odt LANGUAGES CXX C)
################### PROJECT SETUP ##########################
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release) # Release or Debug
endif()
# ---- set C++ language standard ----
set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED YES)
set(CMAKE_CXX_EXTENSIONS NO)
#################### build options
option(BUILD_DOCS "Build ODT documentation" OFF)
set(CHEMISTRY "SIMPLEDLR" CACHE STRING "user mechanism source to add")
set(PARALLEL "no" CACHE STRING "build with mpi")
set(SILENT "yes" CACHE STRING "code output config")
#################### preprocessor directives
if(PARALLEL STREQUAL "yes")
message("MPI is on")
add_definitions(-DDOMPI)
endif()
if(NOT CHEMISTRY STREQUAL "CANTERARR" )
add_definitions(-DPROBLEMSPECIFICRR)
endif()
if(SILENT STREQUAL "yes" )
message("Suppressing some runtime output")
add_definitions(-DSILENT)
endif()
#################### project targets
add_subdirectory(src)
################### OPTIONAL PROJECT TARGETS #################
#-------- DOCUMENTATION --------
if(BUILD_DOCS)
add_subdirectory(docs)
endif()