WillAyd commented on code in PR #45768:
URL: https://github.com/apache/arrow/pull/45768#discussion_r1995771866
##########
cpp/src/arrow/meson.build:
##########
@@ -356,38 +356,82 @@ install_headers(
)
if needs_tests
+ boost_dep = dependency('boost', include_type: 'system', required: false)
+
+ asio_dep = dependency(
+ 'boost',
+ include_type: 'system',
+ modules: 'asio',
+ required: false,
+ )
+
filesystem_dep = dependency(
'boost',
- modules: ['filesystem'],
+ include_type: 'system',
+ modules: 'filesystem',
required: false,
)
- if not filesystem_dep.found()
+
+ process_dep = dependency(
+ 'boost',
+ include_type: 'system',
+ modules: 'process',
+ required: false,
+ )
+
+ if not (boost_dep.found()
+and asio_dep.found()
+and filesystem_dep.found()
+and process_dep.found()
+)
cmake = import('cmake')
boost_opt = cmake.subproject_options()
boost_opt.add_cmake_defines(
- {'BOOST_INCLUDE_LIBRARIES': 'filesystem;system'},
+ {'BOOST_INCLUDE_LIBRARIES': 'asio;filesystem;process'},
)
boost_proj = cmake.subproject('boost', options: boost_opt)
- filesystem_dep = boost_proj.dependency('boost_filesystem')
+ boost_dep = boost_proj.dependency(
+ 'boost_headers',
+ include_type: 'system',
+ )
+ asio_dep = boost_proj.dependency('boost_asio', include_type: 'system')
+ filesystem_dep = boost_proj.dependency(
+ 'boost_filesystem',
+ include_type: 'system',
+ )
+ process_dep = boost_proj.dependency(
+ 'boost_process',
+ include_type: 'system',
+ )
endif
gtest_main_dep = dependency('gtest_main')
gmock_dep = dependency('gmock')
else
+ boost_dep = disabler()
+ asio_dep = disabler()
filesystem_dep = disabler()
gtest_main_dep = disabler()
gmock_dep = disabler()
+ process_dep = disabler()
endif
arrow_test_lib = static_library(
'arrow_testing',
sources: arrow_testing_srcs,
- dependencies: [arrow_dep, filesystem_dep, gtest_main_dep],
+ dependencies: [
+ arrow_dep,
+ asio_dep,
+ boost_dep,
+ filesystem_dep,
+ gtest_main_dep,
Review Comment:
I can open a separate issue for this, but if you swap out gtest_main for
gtest you will get a linker error
```
FAILED: src/arrow/arrow_array_test
c++ -o src/arrow/arrow_array_test
src/arrow/arrow_array_test.p/array_array_test.cc.o
src/arrow/arrow_array_test.p/array_array_binary_test.cc.o
src/arrow/arrow_array_test.p/array_array_dict_test.cc.o
src/arrow/arrow_array_test.p/array_array_list_test.cc.o
src/arrow/arrow_array_test.p/array_array_list_view_test.cc.o
src/arrow/arrow_array_test.p/array_array_run_end_test.cc.o
src/arrow/arrow_array_test.p/array_array_struct_test.cc.o
src/arrow/arrow_array_test.p/array_array_union_test.cc.o
src/arrow/arrow_array_test.p/array_array_view_test.cc.o
src/arrow/arrow_array_test.p/array_statistics_test.cc.o
src/arrow/arrow_array_test.p/.._.._subprojects_googletest-1.15.2_googletest_src_gtest-all.cc.o
src/arrow/arrow_array_test.p/.._.._subprojects_googletest-1.15.2_googlemock_src_gmock-all.cc.o
-Wl,--as-needed -Wl,--no-undefined
'-Wl,-rpath,$ORIGIN/:$ORIGIN/../../subprojects/flatbuffers-24.3.6'
-Wl,-rpath-link,/home/willayd/clones/arrow/cpp/builddir/src/arrow
-Wl,-rpath-link,/home/willayd/clon
es/arrow/cpp/builddir/subprojects/flatbuffers-24.3.6 -Wl,--start-group
src/arrow/libarrow_testing.a src/arrow/libarrow.so
subprojects/boost-1.87.0/libboost_process.a
subprojects/boost-1.87.0/libboost_filesystem.a -Wl,--end-group -pthread
/usr/bin/ld:
/usr/lib/gcc/x86_64-linux-gnu/13/../../../x86_64-linux-gnu/Scrt1.o: in function
`_start':
(.text+0x1b): undefined reference to `main'
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]