From 91ad3fabd18f5c4d956e1356e9fe09e9789fd941 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Sun, 16 Mar 2025 03:56:01 -0400 Subject: [PATCH 1/3] GH-45796: [C++] Add integration directory to Meson configuration --- cpp/meson.build | 4 ++-- cpp/meson.options | 9 ++++++++- cpp/src/arrow/integration/meson.build | 29 +++++++++++++++++++++++++++ cpp/src/arrow/meson.build | 7 +++++++ cpp/subprojects/gflags.wrap | 26 ++++++++++++++++++++++++ 5 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 cpp/src/arrow/integration/meson.build create mode 100644 cpp/subprojects/gflags.wrap diff --git a/cpp/meson.build b/cpp/meson.build index 688239fdd3e4..c08dbac1fc55 100644 --- a/cpp/meson.build +++ b/cpp/meson.build @@ -60,10 +60,10 @@ needs_benchmarks = get_option('benchmarks') needs_csv = get_option('csv') needs_hdfs = get_option('hdfs') needs_filesystem = false or needs_hdfs -needs_integration = false +needs_integration = get_option('integration') needs_tests = get_option('tests') needs_ipc = get_option('ipc') or needs_tests or needs_benchmarks -needs_testing = get_option('testing') or needs_tests or needs_benchmarks +needs_testing = get_option('testing') or needs_tests or needs_benchmarks or needs_integration needs_json = get_option('json') or needs_testing subdir('src/arrow') diff --git a/cpp/meson.options b/cpp/meson.options index d0f3ada76aa4..bc6364fe5122 100644 --- a/cpp/meson.options +++ b/cpp/meson.options @@ -36,11 +36,18 @@ option( value: false, ) +option( + 'integration', + type: 'boolean', + description: 'Build the Arrow integration test executables', + value: false, +) + option( 'ipc', type: 'boolean', description: 'Build the Arrow IPC extensions', - value: false, + value: true, ) option( diff --git a/cpp/src/arrow/integration/meson.build b/cpp/src/arrow/integration/meson.build new file mode 100644 index 000000000000..f63c6e0745de --- /dev/null +++ b/cpp/src/arrow/integration/meson.build @@ -0,0 +1,29 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +install_headers(['json_integration.h']) + +exc = executable( + 'arrow-json-integration-test', + sources: ['json_integration_test.cc'], + dependencies: [arrow_dep, rapidjson_dep, gflags_dep, gtest_dep], + link_with: [arrow_test_lib], +) + +if needs_tests + test('arrow-json-integration-test', exc) +endif diff --git a/cpp/src/arrow/meson.build b/cpp/src/arrow/meson.build index 02ff61a12b2c..bd71dd745f8f 100644 --- a/cpp/src/arrow/meson.build +++ b/cpp/src/arrow/meson.build @@ -392,11 +392,13 @@ if needs_testing gtest_dep = dependency('gtest') gtest_main_dep = dependency('gtest_main') + gtest_dep = dependency('gtest') gmock_dep = dependency('gmock') else filesystem_dep = disabler() gtest_dep = disabler() gtest_main_dep = disabler() + gtest_dep = disabler() gmock_dep = disabler() endif @@ -543,6 +545,11 @@ subdir('c') subdir('io') subdir('util') +gflags_dep = dependency('gflags', include_type: 'system') +if needs_integration or needs_tests + subdir('integration') +endif + if needs_csv subdir('csv') endif diff --git a/cpp/subprojects/gflags.wrap b/cpp/subprojects/gflags.wrap new file mode 100644 index 000000000000..b83d19785d4e --- /dev/null +++ b/cpp/subprojects/gflags.wrap @@ -0,0 +1,26 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +[wrap-file] +source_url = https://github.com/gflags/gflags/archive/refs/tags/v2.2.2.tar.gz +source_filename = gflags-2.2.2.tar.gz +source_hash = 34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf +directory = gflags-2.2.2 +method = cmake + +[provide] +gflags = gflags_static_dep From 92d190f6c3a9e0b0e4af1e85d457d81031bdb944 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Sun, 16 Mar 2025 03:53:34 -0400 Subject: [PATCH 2/3] kou feedback --- cpp/src/arrow/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/src/arrow/meson.build b/cpp/src/arrow/meson.build index bd71dd745f8f..c94663463b62 100644 --- a/cpp/src/arrow/meson.build +++ b/cpp/src/arrow/meson.build @@ -257,7 +257,7 @@ if needs_csv arrow_testing_srcs += ['csv/test_common.cc'] endif -if needs_json +if needs_json or needs_integration rapidjson_dep = dependency('rapidjson', include_type: 'system') else rapidjson_dep = disabler() From 5c61860a93a904a1a62aaad2576e48a5c232fd30 Mon Sep 17 00:00:00 2001 From: Will Ayd Date: Thu, 10 Apr 2025 09:10:56 -0400 Subject: [PATCH 3/3] Revert IPC option change --- cpp/meson.options | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/meson.options b/cpp/meson.options index bc6364fe5122..b6d830691e83 100644 --- a/cpp/meson.options +++ b/cpp/meson.options @@ -47,7 +47,7 @@ option( 'ipc', type: 'boolean', description: 'Build the Arrow IPC extensions', - value: true, + value: false, ) option(