-
Notifications
You must be signed in to change notification settings - Fork 72
Expand file tree
/
Copy pathSetup3rdParty.cmake
More file actions
226 lines (197 loc) · 6.75 KB
/
Copy pathSetup3rdParty.cmake
File metadata and controls
226 lines (197 loc) · 6.75 KB
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# Copyright (c) Lawrence Livermore National Security, LLC and other Conduit
# Project developers. See top-level LICENSE AND COPYRIGHT files for dates and
# other details. No copyright assignment is required to contribute to Conduit.
################################
# Conduit 3rd Party Dependencies
################################
################################
# BLT provides support for:
# gtest, fruit, and mpi
################################
# clear DLL runtime path
set(CONDUIT_TPL_DLL_PATHS)
################################
# Threads support
################################
if(UNIX AND NOT APPLE)
if(ENABLE_RELAY_WEBSERVER)
# on some linux platforms we need to explicitly link threading
# options.
find_package( Threads REQUIRED )
endif()
endif()
################################
# Setup and build json parsing
# yyjson or rapidjson
################################
if(ENABLE_YYJSON)
message(STATUS "Using yyjson for JSON parsing")
add_subdirectory(thirdparty_builtin/yyjson)
include_directories(thirdparty_builtin/yyjson/)
set(CONDUIT_USE_YYJSON TRUE)
else() # rapidjson
include(cmake/thirdparty/SetupRapidJSON.cmake)
message(STATUS "Using RapidJSON Include: ${RAPIDJSON_INCLUDE_DIR}")
include_directories(${RAPIDJSON_INCLUDE_DIR})
endif()
################################
# Setup and build libb64
################################
add_subdirectory(thirdparty_builtin/libb64-1.2.1/)
include_directories(thirdparty_builtin/libb64-1.2.1/include/)
################################
# Setup and build libyaml
################################
add_subdirectory(thirdparty_builtin/libyaml-690a781/)
include_directories(thirdparty_builtin/libyaml-690a781/include)
################################
# Setup includes for fmt
################################
# this cmake var used to signal fmt support for downstream users
set(CONDUIT_USE_FMT TRUE)
# setup include dirs used during conduit build
include_directories(thirdparty_builtin/fmt-7.1.0/)
# setup install of fmt headers for downstream users
install(DIRECTORY
thirdparty_builtin/fmt-7.1.0/conduit_fmt
DESTINATION include/conduit/)
################################
# Optional Features
################################
################################
# Setup and build civetweb
################################
if(ENABLE_RELAY_WEBSERVER)
add_subdirectory(thirdparty_builtin/civetweb-0a95342/)
include_directories(thirdparty_builtin/civetweb-0a95342/include)
endif()
################################
# Setup ZLib if available
################################
if(ZLIB_DIR)
include(cmake/thirdparty/SetupZlib.cmake)
endif()
if(ENABLE_PYTHON)
################################
# Setup includes for Python & Numpy
################################
include(cmake/thirdparty/SetupPython.cmake)
message(STATUS "Using Python Include: ${PYTHON_INCLUDE_DIRS}")
include_directories(${PYTHON_INCLUDE_DIRS})
# if we don't find python, throw a fatal error
if(NOT PYTHON_FOUND)
message(FATAL_ERROR "ENABLE_PYTHON is true, but Python wasn't found.")
endif()
include(cmake/thirdparty/FindNumPy.cmake)
message(STATUS "Using NumPy Include: ${NUMPY_INCLUDE_DIRS}")
include_directories(${NUMPY_INCLUDE_DIRS})
# if we don't find numpy, throw a fatal error
if(NOT NUMPY_FOUND)
message(FATAL_ERROR "ENABLE_PYTHON is true, but NumPy wasn't found.")
endif()
endif()
################################
# Setup HDF5 if available
################################
# Search for HDF5.
if(HDF5_DIR)
include(cmake/thirdparty/SetupHDF5.cmake)
include_directories(${HDF5_INCLUDE_DIRS})
# if we don't find HDF5, throw a fatal error
if(NOT HDF5_FOUND)
message(FATAL_ERROR "HDF5_DIR is set, but HDF5 wasn't found.")
endif()
endif()
################################
# Setup CGNS if available
################################
# Search for CGNS.
if(CGNS_DIR)
include(cmake/thirdparty/SetupCGNS.cmake)
include_directories(${CGNS_INCLUDE_DIRS})
# if we don't find CGNS, throw a fatal error
if(NOT CGNS_FOUND)
message(FATAL_ERROR "CGNS_DIR is set, but CGNS wasn't found.")
endif()
endif()
################################
# Setup Silo if available
################################
# Search for Silo.
if(SILO_DIR)
include(cmake/thirdparty/SetupSilo.cmake)
include_directories(${SILO_INCLUDE_DIRS})
# if we don't find silo, throw a fatal error
if(NOT SILO_FOUND)
message(FATAL_ERROR "SILO_DIR is set, but Silo wasn't found.")
endif()
endif()
################################
# Setup ADIOS if available
################################
# Search for ADIOS.
if(ADIOS_DIR)
include(cmake/thirdparty/SetupADIOS.cmake)
include_directories(${ADIOS_INCLUDE_DIRS})
# if we don't find ADIOS, throw a fatal error
if(NOT ADIOS_FOUND)
message(FATAL_ERROR "ADIOS_DIR is set, but ADIOS wasn't found.")
endif()
endif()
################################
# Setup Zfp if available
################################
# Search for Zfp.
if(ZFP_DIR)
include(cmake/thirdparty/SetupZfp.cmake)
include_directories(${ZFP_INCLUDE_DIR})
# if we don't find Zfp, throw a fatal error
if(NOT ZFP_FOUND)
message(FATAL_ERROR "ZFP_DIR is set, but Zfp wasn't found.")
endif()
endif()
################################
# Setup h5z-zfp if available
################################
if(H5ZZFP_DIR)
include(cmake/thirdparty/SetupH5zZfp.cmake)
include_directories(${H5ZZFP_INCLUDE_DIR})
# if we don't find h5z-zfp, throw a fatal error
if(NOT H5ZZFP_DIR)
message(FATAL_ERROR "H5ZZFP_DIR is set, but h5z-zfp wasn't found.")
endif()
endif()
################################
# Setup Parmetis if available
################################
if(PARMETIS_DIR)
if(NOT ENABLE_MPI)
message(FATAL_ERROR "PARMETIS_DIR is set while ENABLE_MPI is OFF. Parmetis support requires MPI.")
endif()
include(cmake/thirdparty/SetupParmetis.cmake)
include_directories(${PARMETIS_INCLUDE_DIR})
# if we don't find it, throw a fatal error
if(NOT PARMETIS_FOUND)
message(FATAL_ERROR "PARMETIS_DIR is set, but parmetis wasn't found.")
endif()
endif()
################################
# Setup Caliper if available
################################
# Search for Caliper.
if(CALIPER_DIR)
include(cmake/thirdparty/SetupCaliper.cmake)
if(NOT CALIPER_FOUND)
message(FATAL_ERROR "CALIPER_DIR is set, but Caliper wasn't found.")
endif()
endif()
################################
# Setup Totalview if available
################################
# Search for Totalview.
if(TOTALVIEW_DIR)
include(cmake/thirdparty/SetupTotalview.cmake)
if(NOT TOTALVIEW_FOUND)
message(WARNING "TOTALVIEW_DIR is set, but Totalview wasn't found.")
endif()
endif()