forked from boutproject/BOUT-dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bout++Config.cmake.in
161 lines (147 loc) · 4.81 KB
/
bout++Config.cmake.in
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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
@PACKAGE_INIT@
include(CMakeFindDependencyMacro)
set(BOUT_USE_SIGNAL @BOUT_USE_SIGNAL@)
set(BOUT_USE_COLOR @BOUT_USE_COLOR@)
set(BOUT_USE_TRACK @BOUT_USE_TRACK@)
set(BOUT_USE_SIGFPE @BOUT_USE_SIGFPE@)
set(BOUT_USE_BACKTRACE @BOUT_USE_BACKTRACE@)
set(BOUT_USE_OPENMP @BOUT_USE_OPENMP@)
set(BOUT_HAS_CUDA @BOUT_HAS_CUDA@)
set(BOUT_HAS_OUTPUT_DEBUG @BOUT_HAS_OUTPUT_DEBUG@)
set(BOUT_CHECK_LEVEL @BOUT_CHECK_LEVEL@)
set(BOUT_USE_METRIC_3D @BOUT_USE_METRIC_3D@)
set(BOUT_HAS_PVODE @BOUT_HAS_PVODE@)
set(BOUT_HAS_NETCDF @BOUT_HAS_NETCDF@)
set(BOUT_HAS_FFTW @BOUT_HAS_FFTW@)
set(BOUT_HAS_LAPACK @BOUT_HAS_LAPACK@)
set(BOUT_HAS_PETSC @BOUT_HAS_PETSC@)
set(BOUT_HAS_SLEPC @BOUT_HAS_SLEPC@)
set(BOUT_HAS_SCOREP @BOUT_HAS_SCOREP@)
set(BOUT_USE_UUID_SYSTEM_GENERATOR @BOUT_USE_UUID_SYSTEM_GENERATOR@)
set(BOUT_HAS_SUNDIALS @BOUT_HAS_SUNDIALS@)
set(BOUT_HAS_HYPRE @BOUT_HAS_HYPRE@)
set(BOUT_HAS_GETTEXT @BOUT_HAS_GETTEXT@)
set(BOUT_HAS_UMPIRE @BOUT_HAS_UMPIRE@)
set(BOUT_HAS_RAJA @BOUT_HAS_RAJA@)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
if(NOT "@ISINSTALLED@")
# Enables the use of the build directory directly, without having to
# specify the paths for the external packages as well
if(EXISTS "@CMAKE_BINARY_DIR@/externalpackages/fmt")
list(APPEND CMAKE_PREFIX_PATH "@CMAKE_BINARY_DIR@/externalpackages/fmt")
endif()
if(EXISTS "@CMAKE_BINARY_DIR@/externalpackages/mpark.variant")
list(APPEND CMAKE_PREFIX_PATH "@CMAKE_BINARY_DIR@/externalpackages/mpark.variant")
endif()
if(EXISTS "@CMAKE_BINARY_DIR@/externalpackages/PVODE")
list(APPEND CMAKE_PREFIX_PATH "@CMAKE_BINARY_DIR@/externalpackages/PVODE")
endif()
# If using the build directory directly, we need the CMake modules too
if(EXISTS "@PROJECT_SOURCE_DIR@/cmake")
list(APPEND CMAKE_MODULE_PATH "@PROJECT_SOURCE_DIR@/cmake")
endif()
else()
if(EXISTS "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/ ")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
endif()
endif()
include(BOUT++functions)
if(EXISTS "@PETSC_DIR@")
set(PETSC_DIR "@PETSC_DIR@")
endif()
if(EXISTS "@SLEPC_DIR@")
set(SLEPC_DIR "@SLEPC_DIR@")
endif()
if(EXISTS "@SUNDIALS_ROOT@")
set(SUNDIALS_ROOT "@SUNDIALS_ROOT@")
elseif(EXISTS "@SUNDIALS_BINARY_DIR@")
list(APPEND CMAKE_PREFIX_PATH "@SUNDIALS_BINARY_DIR@")
endif()
if(EXISTS "@HYPRE_ROOT@")
set(HYPRE_ROOT "@HYPRE_ROOT@")
endif()
if(EXISTS "@FFTW_ROOT@")
set(FFTW_ROOT "@FFTW_ROOT@")
endif()
if(EXISTS "@LAPACK_ROOT@")
set(LAPACK_ROOT "@LAPACK_ROOT@")
endif()
if(EXISTS "@ScoreP_ROOT@")
set(ScoreP_ROOT "@ScoreP_ROOT@")
endif()
if(EXISTS "@netCDF_ROOT@")
set(netCDF_ROOT "@netCDF_ROOT@")
elseif(EXISTS "@NC_CONFIG@")
set(NC_CONFIG "@NC_CONFIG@")
endif()
if(EXISTS "@netCDFCxx_ROOT@")
set(netCDFCxx_ROOT "@netCDFCxx_ROOT@")
elseif(EXISTS "@NCXX4_CONFIG@")
set(NCXX4_CONFIG "@NCXX4_CONFIG@")
elseif(EXISTS "@NCXX_BINARY_DIR@")
# If we downloaded netCDF-cxx4, then we need to add its build directory to our search paths
list(APPEND CMAKE_PREFIX_PATH "@NCXX_BINARY_DIR@")
endif()
if(EXISTS "@PVODE_ROOT@")
set(PVODE_ROOT "@PVODE_ROOT@")
elseif(EXISTS "@PVODE_DIR@")
set(PVODE_DIR "@PVODE_DIR@")
elseif(EXISTS "@PVODE_BINARY_DIR@")
set(PVODE_DIR "@PVODE_BINARY_DIR@")
endif()
if(EXISTS "@Libuuid_ROOT@")
set(Libuuid_ROOT "@Libuuid_ROOT@")
endif()
if(@BOUT_USE_SYSTEM_MPARK_VARIANT@)
set(mpark_variant_ROOT "@mpark_variant_ROOT@")
else()
# mpark.variant doesn't use GNUInstallDirs, always installs to lib
set(mpark_variant_ROOT "${CMAKE_CURRENT_LIST_DIR}/../../../lib/cmake/mpark_variant")
endif()
if(@BOUT_USE_SYSTEM_FMT@)
set(fmt_ROOT "@fmt_ROOT@")
endif()
set(MPIEXEC_EXECUTABLE @MPIEXEC_EXECUTABLE@)
find_dependency(MPI @MPI_CXX_VERSION@ EXACT)
if (BOUT_USE_OPENMP)
find_dependency(OpenMP)
endif()
if (BOUT_HAS_NETCDF)
find_dependency(netCDF @netCDF_VERSION@)
find_dependency(netCDFCxx @netCDFCxx_VERSION@)
endif()
if (BOUT_HAS_PVODE)
find_dependency(PVODE @PVODE_VERSION@)
endif()
if (BOUT_HAS_FFTW)
find_dependency(FFTW @FFTW_VERSION@)
endif()
if (BOUT_HAS_LAPACK)
find_dependency(LAPACK @LAPACK_VERSION@)
endif()
if (BOUT_HAS_PETSC)
find_dependency(PETSc @PETSC_VERSION@)
endif()
if (BOUT_HAS_SUNDIALS)
find_dependency(SUNDIALS @SUNDIALS_VERSION@)
endif()
if (BOUT_HAS_HYPRE)
find_dependency(HYPRE @HYPRE_VERSION@ EXACT)
endif()
if (BOUT_HAS_GETTEXT)
find_dependency(Gettext @Gettext_VERSION@)
find_dependency(Intl @Intl_VERSION@)
endif()
find_dependency(mpark_variant @mpark_variant_VERSION@)
find_dependency(fmt @fmt_VERSION@)
if (BOUT_HAS_SLEPC)
find_dependency(SLEPc @SLEPC_VERSION@)
endif()
if (BOUT_HAS_SCOREP)
find_dependency(ScoreP)
endif()
if (BOUT_USE_UUID_SYSTEM_GENERATOR)
find_dependency(Libuuid)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/bout++Targets.cmake")