kou commented on code in PR #45768:
URL: https://github.com/apache/arrow/pull/45768#discussion_r1996599469
##########
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:
We can work on this as a separated task.
I think that we need `gtest_main_dep` for each test:
```diff
diff --git a/cpp/src/arrow/meson.build b/cpp/src/arrow/meson.build
index 3a538ca2b2..6e2cc7adb0 100644
--- a/cpp/src/arrow/meson.build
+++ b/cpp/src/arrow/meson.build
@@ -444,7 +444,7 @@ foreach key, val : arrow_tests
exc = executable(
key,
sources: val['sources'],
- dependencies: [arrow_test_dep, val.get('dependencies', [])],
+ dependencies: [val.get('dependencies', []), arrow_test_dep,
gtest_main_dep],
)
test(key, exc)
endforeach
```
--
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]