kou commented on code in PR #45768: URL: https://github.com/apache/arrow/pull/45768#discussion_r1994982368
########## 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() +) Review Comment: Oh... This is a weird format by `meson format`... ########## 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: Do we need to use `gtest_main_dep` here? Can we use `gtest_dep`? (I think `gtest_main_dep` is only needed by test executables.) ########## cpp/src/arrow/util/meson.build: ########## @@ -59,7 +59,14 @@ conf_data.set('ARROW_GCS', false) conf_data.set('ARROW_HDFS', false) conf_data.set('ARROW_S3', false) conf_data.set('ARROW_USE_GLOG', false) -conf_data.set('ARROW_USE_NATIVE_INT128', false) + +if cpp_compiler.has_define('__SIZEOF_INT128__') + use_native_int128 = true +else + use_native_int128 = false +endif Review Comment: ```suggestion use_native_int128 = cpp_compiler.has_define('__SIZEOF_INT128__') ``` ########## 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, + process_dep, Review Comment: `dependencies` affects link order, right? Could you use `process_dep`, `filesystem_dep`, `asio_dep` order because `process_dep` depends on `filesystem_dep` and `asio_dep`? -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org