forked from OPM/opm-upscaling
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
121 lines (105 loc) · 4.35 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# -*- mode: cmake; tab-width: 2; indent-tabs-mode: t; truncate-lines: t; compile-command: "cmake -Wdev" -*-
# vim: set filetype=cmake autoindent tabstop=2 shiftwidth=2 noexpandtab softtabstop=2 nowrap:
###########################################################################
# #
# Note: The bulk of the build system is located in the cmake/ directory. #
# This file only contains the specializations for this particular #
# project. Most likely you are interested in editing one of these #
# files instead: #
# #
# dune.module Name and version number #
# CMakeLists_files.cmake Path of source files #
# cmake/Modules/${project}-prereqs.cmake Dependencies #
# #
###########################################################################
cmake_minimum_required (VERSION 2.8)
# additional search modules
find_path (OPM_MACROS_ROOT cmake/Modules/OpmInit.cmake
PATHS ${opm-macros_ROOT}
${CMAKE_CURRENT_SOURCE_DIR}
DOC "Path to build system macros and scripts"
NO_DEFAULT_PATH
)
list (APPEND CMAKE_MODULE_PATH "${OPM_MACROS_ROOT}/cmake/Modules")
# not the same location as most of the other projects? this hook overrides
macro (dir_hook)
endmacro (dir_hook)
# project information is in dune.module. Read this file and set variables.
# we cannot generate dune.module since it is read by dunecontrol before
# the build starts, so it makes sense to keep the data there then.
include (OpmInit)
set(USE_OPENMP_DEFAULT ON)
# list of prerequisites for this particular project; this is in a
# separate file (in cmake/Modules sub-directory) because it is shared
# with the find module
include (${project}-prereqs)
# read the list of components from this file (in the project directory);
# it should set various lists with the names of the files to include
include (CMakeLists_files.cmake)
macro (config_hook)
opm_need_version_of ("dune-common")
opm_need_version_of ("dune-istl")
list (APPEND ${project}_CONFIG_IMPL_VARS
HAVE_LAPACK
HAVE_UMFPACK
HAVE_SUPERLU
)
endmacro (config_hook)
macro (prereqs_hook)
endmacro (prereqs_hook)
macro (sources_hook)
endmacro (sources_hook)
macro (files_hook)
find_dune_version ("dune" "istl")
if((DUNE_ISTL_VERSION_MAJOR GREATER 2) OR
(DUNE_ISTL_VERSION_MAJOR EQUAL 2 AND DUNE_ISTL_VERSION_MINOR GREATER 2))
list (APPEND MAIN_SOURCE_FILES
opm/elasticity/boundarygrid.cpp
opm/elasticity/elasticity_preconditioners.cpp
opm/elasticity/material.cpp
opm/elasticity/materials.cpp
opm/elasticity/matrixops.cpp
opm/elasticity/meshcolorizer.cpp
opm/elasticity/mpc.cpp
)
list(APPEND PROGRAM_SOURCE_FILES examples/upscale_elasticity.cpp)
list (APPEND EXAMPLE_SOURCE_FILES examples/upscale_elasticity.cpp)
list (APPEND TEST_DATA_FILES
tests/input_data/reference_solutions/upscale_elasticity_mpc_EightCells.txt
tests/input_data/reference_solutions/upscale_elasticity_mortar_EightCells.txt
)
list (APPEND PUBLIC_HEADER_FILES
opm/elasticity/applier.hpp
opm/elasticity/asmhandler.hpp
opm/elasticity/asmhandler_impl.hpp
opm/elasticity/boundarygrid.hh
opm/elasticity/elasticity.hpp
opm/elasticity/elasticity_impl.hpp
opm/elasticity/elasticity_preconditioners.hpp
opm/elasticity/elasticity_upscale.hpp
opm/elasticity/elasticity_upscale_impl.hpp
opm/elasticity/logutils.hpp
opm/elasticity/material.hh
opm/elasticity/materials.hh
opm/elasticity/matrixops.hpp
opm/elasticity/mortar_evaluator.hpp
opm/elasticity/mortar_schur.hpp
opm/elasticity/mortar_schur_precond.hpp
opm/elasticity/mortar_utils.hpp
opm/elasticity/mpc.hh
opm/elasticity/shapefunctions.hpp
opm/elasticity/uzawa_solver.hpp
)
endif()
endmacro (files_hook)
macro (fortran_hook)
# interface requires a variable to inspect, a value won't suffice
set (UNCONDITIONALLY TRUE)
set (${project}_FORTRAN_IF UNCONDITIONALLY)
endmacro (fortran_hook)
macro (tests_hook)
endmacro (tests_hook)
# all setup common to the OPM library modules is done here
include (OpmLibMain)
# setup extra tests (using helper binaries)
include (${CMAKE_CURRENT_SOURCE_DIR}/TestUpscalingBinaries.cmake)