@@ -41,48 +41,15 @@ install_headers(
4141if needs_compute
4242 pkg.generate(
4343 filebase : ' arrow-compute' ,
44- name : ' Apache Arrow Compute Kernels ' ,
45- description : ' Apache Arrow \' s Compute Kernels ' ,
44+ name : ' Apache Arrow Compute' ,
45+ description : ' All compute kernels for Apache Arrow ' ,
4646 requires : [' arrow' ],
4747 )
4848endif
4949
50- # Define arrow_compute_core_testing object library for common test files requiring
51- # only core compute. No extra kernels are required.
50+ arrow_compute_testing_srcs = []
5251if needs_testing
53- arrow_compute_core_test_lib = library (
54- ' arrow-compute-core-testing' ,
55- sources : files (' test_util_internal.cc' ),
56- dependencies : arrow_test_dep,
57- )
58- arrow_compute_core_test_dep = declare_dependency (
59- link_with : arrow_compute_core_test_lib,
60- )
61- else
62- arrow_compute_core_test_dep = disabler ()
63- endif
64-
65- # Define arrow_compute_testing object library for test files requiring extra kernels.
66- if needs_testing and needs_compute
67- arrow_compute_testing_lib = library (
68- ' arrow-compute-testing' ,
69- sources : files (' test_env.cc' ),
70- dependencies : [
71- arrow_compute_dep,
72- arrow_compute_core_test_dep,
73- arrow_test_dep_no_main,
74- ],
75- )
76- arrow_compute_test_dep = declare_dependency (
77- link_with : arrow_compute_testing_lib,
78- dependencies : [
79- arrow_compute_dep,
80- arrow_compute_core_test_dep,
81- arrow_test_dep_no_main,
82- ],
83- )
84- else
85- arrow_compute_test_dep = disabler ()
52+ arrow_compute_testing_srcs += files (' test_util_internal.cc' )
8653endif
8754
8855exc = executable (
@@ -92,13 +59,15 @@ exc = executable(
9259 ' exec_test.cc' ,
9360 ' kernel_test.cc' ,
9461 ' registry_test.cc' ,
95- ],
96- dependencies : [arrow_compute_core_test_dep, arrow_test_dep],
62+ ] + arrow_compute_testing_srcs ,
63+ dependencies : [arrow_test_dep],
9764)
9865test (' arrow-internals-test' , exc)
9966
10067compute_tests = {
101- ' arrow-compute-expression-test' : {' sources' : [' expression_test.cc' ]},
68+ ' arrow-compute-expression-test' : {
69+ ' sources' : [' expression_test.cc' ] + arrow_compute_testing_srcs,
70+ },
10271 ' arrow-compute-row-test' : {
10372 ' sources' : [
10473 ' key_hash_test.cc' ,
@@ -108,7 +77,7 @@ compute_tests = {
10877 ' row/row_encoder_internal_test.cc' ,
10978 ' row/row_test.cc' ,
11079 ' util_internal_test.cc' ,
111- ],
80+ ] + arrow_compute_testing_srcs ,
11281 },
11382}
11483
@@ -127,14 +96,16 @@ compute_tests = {
12796# - value_counts
12897#
12998# Also see: GH-34388, GH-34615
130- foreach key, val : compute_tests
131- exc = executable (
132- key,
133- sources : val[' sources' ],
134- dependencies : [arrow_compute_test_dep],
135- )
136- test (key, exc)
137- endforeach
99+ if needs_compute
100+ foreach key, val : compute_tests
101+ exc = executable (
102+ key,
103+ sources : val[' sources' ],
104+ dependencies : [arrow_test_dep],
105+ )
106+ test (key, exc)
107+ endforeach
108+ endif
138109
139110exc = executable (
140111 ' arrow-compute-function-benchmark' ,
0 commit comments