-
Notifications
You must be signed in to change notification settings - Fork 21
/
CMakeLists.txt
82 lines (66 loc) · 1.9 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
cmake_minimum_required(VERSION 3.13)
# Fix cmake behavior for CMAKE_CXX_STANDARD with clang on Mac OS X.
# See cmake documentation on CMP0025 policy for details.
# Must be done before doing project() command.
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake")
include(VersionFromGit)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
project(Xolotl
VERSION ${VERSION}
LANGUAGES CXX
)
## MPI
find_package(MPI REQUIRED)
## PETSc
find_package(PETSc REQUIRED)
option(Xolotl_USE_64BIT_INDEX_TYPE "" ${PETSc_USE_64BIT_INDICES})
## Boost
# Note that we only need to list Boost component libraries that have a
# library implementation (i.e., not header only) as required components.
find_package(Boost REQUIRED COMPONENTS
log_setup
log
program_options
)
## HDF5
#set(HDF5_USE_STATIC_LIBRARIES yes)
set(HDF5_PREFER_PARALLEL ON)
enable_language(C)
find_package(HDF5 REQUIRED)
if(NOT HDF5_IS_PARALLEL)
message(STATUS "WARNING! Detected HDF5 installation does not support parallel I/O!")
endif()
## plsm
include(SetupPlsm)
list(APPEND CMAKE_PREFIX_PATH ${plsm_DIR})
find_package(plsm 2.0 REQUIRED)
## PAPI
find_package(PAPI)
## VTKm
if(VTKm_DIR OR VTKM_DIR)
list(APPEND CMAKE_PREFIX_PATH ${VTKm_DIR} ${VTKM_DIR})
find_package(VTKm REQUIRED)
else()
message(STATUS "Visualization support needs explicit VTKm_DIR.")
endif()
include(CTest)
include(XolotlExtraTesting)
## xolotl
set(XOLOTL_USE_64BIT_INDEX_TYPE ${Xolotl_USE_64BIT_INDEX_TYPE} CACHE INTERNAL "")
option(Xolotl_INCLUDE_RN_TPP_FILES
"If enabled, always include reaction network template instantiation functions with headers"
OFF
)
set(XOLOTL_INCLUDE_RN_TPP_FILES ${Xolotl_INCLUDE_RN_TPP_FILES})
add_subdirectory(xolotl)
## xconv
add_subdirectory(xconv)
## testing
add_subdirectory(test)
## documentation
add_subdirectory(doc)