@@ -227,6 +227,87 @@ arrow_components = {
227
227
},
228
228
}
229
229
230
+ arrow_testing_srcs = [
231
+ ' io/test_common.cc' ,
232
+ ' ipc/test_common.cc' ,
233
+ ' testing/fixed_width_test_util.cc' ,
234
+ ' testing/generator.cc' ,
235
+ ' testing/gtest_util.cc' ,
236
+ ' testing/math.cc' ,
237
+ ' testing/process.cc' ,
238
+ ' testing/random.cc' ,
239
+ ' testing/util.cc' ,
240
+ ]
241
+
242
+ if needs_integration or needs_tests
243
+ arrow_components += {
244
+ ' arrow_integration' : {
245
+ ' sources' : [
246
+ ' integration/c_data_integration_internal.cc' ,
247
+ ' integration/json_integration.cc' ,
248
+ ' integration/json_internal.cc' ,
249
+ ],
250
+ ' include_dirs' : [],
251
+ ' dependencies' : [],
252
+ },
253
+ }
254
+ endif
255
+
256
+ if needs_json
257
+ rapidjson_dep = dependency (' rapidjson' , include_type : ' system' )
258
+ else
259
+ rapidjson_dep = disabler ()
260
+ endif
261
+
262
+ if needs_ipc
263
+ arrow_ipc_srcs = [
264
+ ' ipc/dictionary.cc' ,
265
+ ' ipc/feather.cc' ,
266
+ ' ipc/message.cc' ,
267
+ ' ipc/metadata_internal.cc' ,
268
+ ' ipc/options.cc' ,
269
+ ' ipc/reader.cc' ,
270
+ ' ipc/writer.cc' ,
271
+ ]
272
+
273
+ flatbuffers_dep = dependency (' flatbuffers' )
274
+ arrow_ipc_deps = [flatbuffers_dep]
275
+
276
+ if needs_json
277
+ arrow_ipc_srcs += ' ipc/json_simple.cc'
278
+ arrow_ipc_deps += rapidjson_dep
279
+ endif
280
+
281
+ arrow_components += {
282
+ ' arrow_ipc' : {
283
+ ' sources' : arrow_ipc_srcs,
284
+ ' include_dirs' : [],
285
+ ' dependencies' : arrow_ipc_deps,
286
+ },
287
+ }
288
+ endif
289
+
290
+ if needs_json
291
+ arrow_components += {
292
+ ' arrow_json' : {
293
+ ' sources' : [
294
+ ' extension/fixed_shape_tensor.cc' ,
295
+ ' extension/opaque.cc' ,
296
+ ' json/options.cc' ,
297
+ ' json/chunked_builder.cc' ,
298
+ ' json/chunker.cc' ,
299
+ ' json/converter.cc' ,
300
+ ' json/object_parser.cc' ,
301
+ ' json/object_writer.cc' ,
302
+ ' json/parser.cc' ,
303
+ ' json/reader.cc' ,
304
+ ],
305
+ ' include_dirs' : [],
306
+ ' dependencies' : [rapidjson_dep],
307
+ },
308
+ }
309
+ endif
310
+
230
311
arrow_srcs = []
231
312
include_dir = include_directories (' ..' )
232
313
arrow_includes = [include_dir]
@@ -289,6 +370,63 @@ install_headers(
289
370
install_dir : ' arrow' ,
290
371
)
291
372
373
+ if needs_tests
374
+ filesystem_dep = dependency (
375
+ ' boost' ,
376
+ modules : [' filesystem' ],
377
+ required : false ,
378
+ )
379
+ if not filesystem_dep.found()
380
+ cmake = import (' cmake' )
381
+ boost_opt = cmake.subproject_options()
382
+ boost_opt.add_cmake_defines(
383
+ {' BOOST_INCLUDE_LIBRARIES' : ' filesystem;system' },
384
+ )
385
+ boost_proj = cmake.subproject (' boost' , options : boost_opt)
386
+ filesystem_dep = boost_proj.dependency (' boost_filesystem' )
387
+ endif
388
+
389
+ gtest_main_dep = dependency (' gtest_main' )
390
+ gmock_dep = dependency (' gmock' )
391
+ else
392
+ filesystem_dep = disabler ()
393
+ gtest_main_dep = disabler ()
394
+ gmock_dep = disabler ()
395
+ endif
396
+
397
+ arrow_test_lib = static_library (
398
+ ' arrow_testing' ,
399
+ sources : arrow_testing_srcs,
400
+ include_directories : [include_dir],
401
+ link_with : [arrow_lib],
402
+ dependencies : [filesystem_dep, gtest_main_dep],
403
+ )
404
+
405
+ arrow_test_dep = declare_dependency (
406
+ link_with : [arrow_lib, arrow_test_lib],
407
+ include_directories : [include_dir],
408
+ dependencies : [filesystem_dep, gmock_dep, gtest_main_dep],
409
+ )
410
+
411
+ array_array_test = executable (
412
+ ' arrow_array_test' ,
413
+ sources : [
414
+ ' array/array_test.cc' ,
415
+ ' array/array_binary_test.cc' ,
416
+ ' array/array_dict_test.cc' ,
417
+ ' array/array_list_test.cc' ,
418
+ ' array/array_list_view_test.cc' ,
419
+ ' array/array_run_end_test.cc' ,
420
+ ' array/array_struct_test.cc' ,
421
+ ' array/array_union_test.cc' ,
422
+ ' array/array_view_test.cc' ,
423
+ ' array/statistics_test.cc' ,
424
+ ],
425
+ dependencies : [arrow_test_dep],
426
+ )
427
+
428
+ test (' arrow_array_test' , array_array_test)
429
+
292
430
version = meson .project_version()
293
431
294
432
version_no_snapshot = version.split(' -SNAPSHOT' )[0 ]
0 commit comments