@@ -23,13 +23,13 @@ cpp_proto_substrait = cpp_srcdir / 'query' / 'substrait'
23
23
cpp_proto_mohair = cpp_srcdir / ' query' / ' mohair'
24
24
25
25
# dir for adapters (execution engines)
26
- cpp_enginedir = cpp_srcdir / ' engines'
26
+ cpp_enginedir = cpp_srcdir / ' engines'
27
27
28
28
# dir for flight services
29
29
cpp_servicedir = cpp_srcdir / ' services'
30
30
31
31
# dir for binary sources (1-1 with binaries)
32
- cpp_tooldir = cpp_srcdir / ' toolbox'
32
+ cpp_tooldir = cpp_srcdir / ' toolbox'
33
33
34
34
35
35
# ------------------------------
@@ -38,7 +38,6 @@ cpp_tooldir = cpp_srcdir / 'toolbox'
38
38
# use pkg-config to generate library build info
39
39
module_pkgcfg = import (' pkgconfig' )
40
40
41
-
42
41
# >> Determine the system we're building on
43
42
buildsys_type = ' unknown'
44
43
@@ -68,17 +67,15 @@ endif
68
67
# ------------------------------
69
68
# Library dependencies
70
69
70
+ default_includedir = get_option (' prefix' ) / get_option (' includedir' )
71
+
71
72
# >> System-dependent dependencies
72
73
73
74
# Include directory for arrow headers
74
- arrow_incdir = ''
75
+ arrow_incdir = default_includedir
75
76
76
- # NOTE: with brew installed dependencies, macosx can resolve like archlinux
77
- # otherwise, macosx deps might need "manual" resolution (specific paths)
78
- if buildsys_type == ' macosx'
79
- arrow_incdir = ' /opt/homebrew/include'
80
- elif buildsys_type == ' archlinux'
81
- endif
77
+ # Include directory for substrait and mohair headers
78
+ protocol_incdir = default_includedir / ' mohair-substrait'
82
79
83
80
84
81
# >> Required dependencies
@@ -89,14 +86,23 @@ dep_acero = dependency('arrow-substrait') # this is Acero + substrait
89
86
dep_flight = dependency (' arrow-flight' )
90
87
91
88
# |> Protobuf (for substrait)
89
+ dep_mohairsubstrait = dependency (' mohair-substrait' , static : true )
90
+
92
91
dep_proto = dependency (' protobuf' )
92
+ dep_absl = dependency (' absl'
93
+ ,modules : [
94
+ ' absl::log_internal_check_op'
95
+ ,' absl::status'
96
+ ]
97
+ )
93
98
94
99
95
100
# >> Optional dependencies
96
101
# |> Faodel
97
102
dep_ompi = dependency (' ompi-cxx' , required : get_option (' mpi' ))
98
103
dep_faodel = dependency (' faodel' , required : get_option (' faodel' ))
99
104
dep_tiledb = dependency (' tiledb' , required : get_option (' tiledb' ))
105
+
100
106
dep_duckdb = dependency (' duckdb'
101
107
,method : ' cmake'
102
108
,required : get_option (' duckdb' )
@@ -129,8 +135,9 @@ mohair_cfgfile = configure_file(
129
135
130
136
131
137
# >> Grouped dependencies
132
- dep_service = [dep_arrow, dep_acero, dep_flight, dep_ompi, dep_faodel, dep_proto]
133
- dep_query = [dep_arrow, dep_acero, dep_proto]
138
+ dep_query = [dep_arrow, dep_acero, dep_absl, dep_proto]
139
+ # dep_query = [dep_arrow, dep_acero, dep_mohairsubstrait]
140
+ dep_service = dep_query + [dep_flight]
134
141
135
142
# |> add optional dependencies
136
143
if dep_faodel.found()
@@ -154,19 +161,19 @@ endif
154
161
# Composable lists of headers
155
162
156
163
# >> For substrait definitions
157
- substrait_hdrlist = [
158
- cpp_proto_mohair / ' algebra.pb.h'
159
- ,cpp_proto_mohair / ' topology.pb.h'
160
- ,cpp_proto_substrait / ' type.pb.h'
161
- ,cpp_proto_substrait / ' function.pb.h'
162
- ,cpp_proto_substrait / ' plan.pb.h'
163
- ,cpp_proto_substrait / ' algebra.pb.h'
164
- ,cpp_proto_substrait / ' capabilities.pb.h'
165
- ,cpp_proto_substrait / ' parameterized_types.pb.h'
166
- ,cpp_proto_substrait / ' type_expressions.pb.h'
167
- ,cpp_proto_substrait / ' extended_expression.pb.h'
168
- ,cpp_proto_substrait / ' extensions' / ' extensions.pb.h'
169
- ]
164
+ # substrait_hdrlist = [
165
+ # cpp_proto_mohair / 'algebra.pb.h'
166
+ # ,cpp_proto_mohair / 'topology.pb.h'
167
+ # ,cpp_proto_substrait / 'type.pb.h'
168
+ # ,cpp_proto_substrait / 'function.pb.h'
169
+ # ,cpp_proto_substrait / 'plan.pb.h'
170
+ # ,cpp_proto_substrait / 'algebra.pb.h'
171
+ # ,cpp_proto_substrait / 'capabilities.pb.h'
172
+ # ,cpp_proto_substrait / 'parameterized_types.pb.h'
173
+ # ,cpp_proto_substrait / 'type_expressions.pb.h'
174
+ # ,cpp_proto_substrait / 'extended_expression.pb.h'
175
+ # ,cpp_proto_substrait / 'extensions' / 'extensions.pb.h'
176
+ # ]
170
177
171
178
# >> For decomposable queries
172
179
query_hdrlist = [
@@ -209,19 +216,19 @@ services_hdrlist = [
209
216
# Composable lists of sources
210
217
211
218
# >> For substrait implementations
212
- substrait_srclist = [
213
- cpp_proto_mohair / ' algebra.pb.cc'
214
- ,cpp_proto_mohair / ' topology.pb.cc'
215
- ,cpp_proto_substrait / ' algebra.pb.cc'
216
- ,cpp_proto_substrait / ' extensions' / ' extensions.pb.cc'
217
- ,cpp_proto_substrait / ' type.pb.cc'
218
- ,cpp_proto_substrait / ' function.pb.cc'
219
- ,cpp_proto_substrait / ' type_expressions.pb.cc'
220
- ,cpp_proto_substrait / ' parameterized_types.pb.cc'
221
- ,cpp_proto_substrait / ' extended_expression.pb.cc'
222
- ,cpp_proto_substrait / ' capabilities.pb.cc'
223
- ,cpp_proto_substrait / ' plan.pb.cc'
224
- ]
219
+ # substrait_srclist = [
220
+ # cpp_proto_mohair / 'algebra.pb.cc'
221
+ # ,cpp_proto_mohair / 'topology.pb.cc'
222
+ # ,cpp_proto_substrait / 'algebra.pb.cc'
223
+ # ,cpp_proto_substrait / 'extensions' / 'extensions.pb.cc'
224
+ # ,cpp_proto_substrait / 'type.pb.cc'
225
+ # ,cpp_proto_substrait / 'function.pb.cc'
226
+ # ,cpp_proto_substrait / 'type_expressions.pb.cc'
227
+ # ,cpp_proto_substrait / 'parameterized_types.pb.cc'
228
+ # ,cpp_proto_substrait / 'extended_expression.pb.cc'
229
+ # ,cpp_proto_substrait / 'capabilities.pb.cc'
230
+ # ,cpp_proto_substrait / 'plan.pb.cc'
231
+ # ]
225
232
226
233
# >> For decomposable queries
227
234
query_srclist = [
@@ -244,19 +251,22 @@ services_srclist = [
244
251
# Composed header and source lists (organized by library/binary)
245
252
246
253
# >> Library for mohair query processing
247
- libmohair_srclist = (substrait_srclist + query_srclist)
254
+ # libmohair_srclist = (substrait_srclist + query_srclist)
255
+ libmohair_srclist = query_srclist
248
256
249
257
# >> Binary for mohair flight services
250
- mohair_srv_srclist = (substrait_srclist + query_srclist + services_srclist)
258
+ # mohair_srv_srclist = (substrait_srclist + query_srclist + services_srclist)
259
+ mohair_srv_srclist = (query_srclist + services_srclist)
251
260
252
261
253
262
# ------------------------------
254
263
# Library definitions
255
264
256
265
libmohair = library (' mohair'
257
266
,libmohair_srclist
258
- ,dependencies : dep_query
259
- ,include_directories : arrow_incdir
267
+ ,dependencies : [dep_service, dep_mohairsubstrait]
268
+ ,include_directories : [protocol_incdir]
269
+ # ,link_with : dep_mohairsubstrait
260
270
,install : true
261
271
)
262
272
@@ -267,8 +277,8 @@ module_pkgcfg.generate(libmohair)
267
277
268
278
install_headers (query_hdrlist, subdir : ' mohair' )
269
279
libmohair_dep = declare_dependency (
270
- include_directories : arrow_incdir
271
- ,dependencies : [dep_arrow, dep_duckdb]
280
+ include_directories : [protocol_incdir]
281
+ ,dependencies : dep_service
272
282
,link_with : libmohair
273
283
)
274
284
@@ -285,16 +295,13 @@ bin_readarrow_srclist = [
285
295
]
286
296
287
297
if dep_duckdb.found()
288
- message (' Adding duckdb source to read-arrow source list' )
289
298
bin_readarrow_srclist += [cpp_enginedir / ' duckdb.cpp' ]
290
-
291
- message (bin_readarrow_srclist)
292
299
endif
293
300
294
301
bin_readarrow = executable (' read-arrow'
295
302
,bin_readarrow_srclist
296
303
,dependencies : [dep_arrow, dep_duckdb]
297
- ,include_directories : arrow_incdir
304
+ ,include_directories : [protocol_incdir]
298
305
,install : false
299
306
)
300
307
@@ -307,7 +314,7 @@ bin_mohairquery_srclist = (
307
314
bin_mohairquery = executable (' mohair'
308
315
,bin_mohairquery_srclist
309
316
,dependencies : [dep_query, dep_duckdb]
310
- ,include_directories : arrow_incdir
317
+ ,include_directories : [protocol_incdir]
311
318
,install : true
312
319
)
313
320
@@ -321,8 +328,9 @@ bin_mohairclient_srclist = (
321
328
)
322
329
bin_mohairclient = executable (' mohair-client'
323
330
,bin_mohairclient_srclist
324
- ,dependencies : dep_service
325
- ,include_directories : arrow_incdir
331
+ ,include_directories : [protocol_incdir]
332
+ ,dependencies : [dep_service, dep_mohairsubstrait]
333
+ # ,link_with : dep_mohairsubstrait
326
334
,install : false
327
335
)
328
336
@@ -340,8 +348,9 @@ csd_srv_srclist = (
340
348
341
349
bin_srv_csd = executable (' csd-service'
342
350
,csd_srv_srclist
343
- ,dependencies : dep_service
344
- ,include_directories : arrow_incdir
351
+ ,include_directories : [protocol_incdir]
352
+ ,dependencies : [dep_service, dep_mohairsubstrait]
353
+ # ,link_with : dep_mohairsubstrait
345
354
,install : false
346
355
)
347
356
@@ -358,32 +367,7 @@ topo_srv_srclist = (
358
367
bin_srv_topo = executable (' topo-service'
359
368
,topo_srv_srclist
360
369
,dependencies : dep_service
361
- ,include_directories : arrow_incdir
370
+ ,include_directories : [protocol_incdir]
362
371
,install : false
363
372
)
364
373
365
-
366
- # ------------------------------
367
- # Feature-based executables
368
-
369
- # >> Faodel mohair service
370
- if dep_faodel.found()
371
-
372
- # main source file and faodel-specific source files
373
- faodel_srv_srclist = (
374
- [
375
- cpp_tooldir / ' faodel-service.cpp'
376
- ,cpp_enginedir / ' faodel.cpp'
377
- ,cpp_servicedir / ' service_faodel.cpp'
378
- ]
379
- + mohair_srv_srclist
380
- )
381
-
382
- bin_srv_faodel = executable (' faodel-service'
383
- ,faodel_srv_srclist
384
- ,dependencies : dep_service
385
- ,include_directories : arrow_incdir
386
- ,install : false
387
- )
388
-
389
- endif
0 commit comments