kou commented on code in PR #45441: URL: https://github.com/apache/arrow/pull/45441#discussion_r1951843281
########## cpp/meson.build: ########## @@ -0,0 +1,59 @@ +# 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. + +project( + 'arrow', + 'cpp', + 'c', + version: '19.0.0-SNAPSHOT', + license: 'Apache 2.0', + meson_version: '>=1.3.0', + default_options: [ + 'buildtype=release', + 'c_std=c99', + 'warning_level=2', + 'cpp_std=c++17', + ], +) + +project_args = [ + '-Wno-unused-parameter', + '-Wno-array-bounds', + '-Wno-stringop-overflow', + '-Wno-aggressive-loop-optimizations', + '-Wno-nonnull', +] + +c_compiler = meson.get_compiler('c') +c_args = c_compiler.get_supported_arguments(project_args) +add_project_arguments(c_args, language: 'c') + +cpp_compiler = meson.get_compiler('cpp') +cpp_args = cpp_compiler.get_supported_arguments(project_args) +add_project_arguments(cpp_args, language: 'cpp') + +git_id = get_option('git_id') +if git_id == '' + git_id = run_command('git', 'log', '-n1', '--format=%H', check: true).stdout().strip() +endif + +git_description = get_option('git_description') +if git_description == '' + git_description = run_command('git', 'describe', '--tags', check: true).stdout().strip() Review Comment: ```suggestion git_description = run_command('git', 'describe', '--tags').stdout().strip() ``` ########## cpp/meson.build: ########## @@ -0,0 +1,59 @@ +# 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. + +project( + 'arrow', + 'cpp', + 'c', + version: '19.0.0-SNAPSHOT', + license: 'Apache 2.0', + meson_version: '>=1.3.0', + default_options: [ + 'buildtype=release', + 'c_std=c99', + 'warning_level=2', + 'cpp_std=c++17', + ], +) + +project_args = [ + '-Wno-unused-parameter', + '-Wno-array-bounds', + '-Wno-stringop-overflow', + '-Wno-aggressive-loop-optimizations', + '-Wno-nonnull', +] + +c_compiler = meson.get_compiler('c') +c_args = c_compiler.get_supported_arguments(project_args) +add_project_arguments(c_args, language: 'c') + +cpp_compiler = meson.get_compiler('cpp') +cpp_args = cpp_compiler.get_supported_arguments(project_args) +add_project_arguments(cpp_args, language: 'cpp') + +git_id = get_option('git_id') +if git_id == '' + git_id = run_command('git', 'log', '-n1', '--format=%H', check: true).stdout().strip() Review Comment: Can we ignore `git log` error? This will fail when we use source archive. ```suggestion git_id = run_command('git', 'log', '-n1', '--format=%H').stdout().strip() ``` ########## cpp/src/arrow/meson.build: ########## @@ -0,0 +1,333 @@ +# 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. + +include_dir = include_directories('..') + +dl_dep = dependency('dl') + +# Meson does not natively support object libraries +# https://github.com/mesonbuild/meson/issues/13843 +objlib_sources = { + 'arrow_array': { + 'sources': [ + 'array/array_base.cc', + 'array/array_binary.cc', + 'array/array_decimal.cc', + 'array/array_dict.cc', + 'array/array_nested.cc', + 'array/array_primitive.cc', + 'array/array_run_end.cc', + 'array/builder_adaptive.cc', + 'array/builder_base.cc', + 'array/builder_binary.cc', + 'array/builder_decimal.cc', + 'array/builder_dict.cc', + 'array/builder_run_end.cc', + 'array/builder_nested.cc', + 'array/builder_primitive.cc', + 'array/builder_union.cc', + 'array/concatenate.cc', + 'array/data.cc', + 'array/diff.cc', + 'array/statistics.cc', + 'array/util.cc', + 'array/validate.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_compute': { + 'sources': [ + 'compute/api_aggregate.cc', + 'compute/api_scalar.cc', + 'compute/api_vector.cc', + 'compute/cast.cc', + 'compute/exec.cc', + 'compute/expression.cc', + 'compute/function.cc', + 'compute/function_internal.cc', + 'compute/kernel.cc', + 'compute/ordering.cc', + 'compute/registry.cc', + 'compute/kernels/chunked_internal.cc', + 'compute/kernels/codegen_internal.cc', + 'compute/kernels/ree_util_internal.cc', + 'compute/kernels/scalar_cast_boolean.cc', + 'compute/kernels/scalar_cast_dictionary.cc', + 'compute/kernels/scalar_cast_extension.cc', + 'compute/kernels/scalar_cast_internal.cc', + 'compute/kernels/scalar_cast_nested.cc', + 'compute/kernels/scalar_cast_numeric.cc', + 'compute/kernels/scalar_cast_string.cc', + 'compute/kernels/scalar_cast_temporal.cc', + 'compute/kernels/util_internal.cc', + 'compute/kernels/vector_hash.cc', + 'compute/kernels/vector_selection.cc', + 'compute/kernels/vector_selection_filter_internal.cc', + 'compute/kernels/vector_selection_internal.cc', + 'compute/kernels/vector_selection_take_internal.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_io': { + 'sources': [ + 'io/buffered.cc', + 'io/caching.cc', + 'io/compressed.cc', + 'io/file.cc', + 'io/hdfs.cc', + 'io/hdfs_internal.cc', + 'io/interfaces.cc', + 'io/memory.cc', + 'io/slow.cc', + 'io/stdio.cc', + 'io/transform.cc', + ], + 'include_dirs': [ + include_dir, + include_directories('../../thirdparty/hadoop/include'), + ], + 'dependencies': [dl_dep], + }, + 'arrow_util': { + 'sources': [ + 'util/align_util.cc', + 'util/async_util.cc', + 'util/atfork_internal.cc', + 'util/basic_decimal.cc', + 'util/bit_block_counter.cc', + 'util/bit_run_reader.cc', + 'util/bit_util.cc', + 'util/bitmap.cc', + 'util/bitmap_builders.cc', + 'util/bitmap_ops.cc', + 'util/bpacking.cc', + 'util/byte_size.cc', + 'util/cancel.cc', + 'util/compression.cc', + 'util/counting_semaphore.cc', + 'util/cpu_info.cc', + 'util/crc32.cc', + 'util/debug.cc', + 'util/decimal.cc', + 'util/delimiting.cc', + 'util/dict_util.cc', + 'util/fixed_width_internal.cc', + 'util/float16.cc', + 'util/formatting.cc', + 'util/future.cc', + 'util/hashing.cc', + 'util/int_util.cc', + 'util/io_util.cc', + 'util/list_util.cc', + 'util/logger.cc', + 'util/logging.cc', + 'util/key_value_metadata.cc', + 'util/memory.cc', + 'util/mutex.cc', + 'util/ree_util.cc', + 'util/string.cc', + 'util/string_builder.cc', + 'util/task_group.cc', + 'util/tdigest.cc', + 'util/thread_pool.cc', + 'util/time.cc', + 'util/tracing.cc', + 'util/trie.cc', + 'util/union_util.cc', + 'util/unreachable.cc', + 'util/uri.cc', + 'util/utf8.cc', + 'util/value_parsing.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'memory_pool': { + 'sources': ['memory_pool.cc'], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'vendored': { + 'sources': [ + 'vendored/base64.cpp', + 'vendored/datetime.cpp', + 'vendored/double-conversion/bignum-dtoa.cc', + 'vendored/double-conversion/bignum.cc', + 'vendored/double-conversion/cached-powers.cc', + 'vendored/double-conversion/double-to-string.cc', + 'vendored/double-conversion/fast-dtoa.cc', + 'vendored/double-conversion/fixed-dtoa.cc', + 'vendored/double-conversion/string-to-double.cc', + 'vendored/double-conversion/strtod.cc', + 'vendored/musl/strptime.c', + 'vendored/uriparser/UriCommon.c', + 'vendored/uriparser/UriCompare.c', + 'vendored/uriparser/UriEscape.c', + 'vendored/uriparser/UriFile.c', + 'vendored/uriparser/UriIp4.c', + 'vendored/uriparser/UriIp4Base.c', + 'vendored/uriparser/UriMemory.c', + 'vendored/uriparser/UriNormalize.c', + 'vendored/uriparser/UriNormalizeBase.c', + 'vendored/uriparser/UriParse.c', + 'vendored/uriparser/UriParseBase.c', + 'vendored/uriparser/UriQuery.c', + 'vendored/uriparser/UriRecompose.c', + 'vendored/uriparser/UriResolve.c', + 'vendored/uriparser/UriShorten.c', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, +} + +objlibs = [] +foreach key, val : objlib_sources + slib = static_library( + key, + sources: val['sources'], + include_directories: val['include_dirs'], + dependencies: val['dependencies'], + build_by_default: false, + ) + objlibs += slib.extract_all_objects(recursive: true) +endforeach + +arrow_srcs = [ + 'builder.cc', + 'buffer.cc', + 'chunked_array.cc', + 'chunk_resolver.cc', + 'compare.cc', + 'config.cc', + 'datum.cc', + 'device.cc', + 'device_allocation_type_set.cc', + 'extension_type.cc', + 'extension/bool8.cc', + 'extension/json.cc', + 'extension/uuid.cc', + 'pretty_print.cc', + 'record_batch.cc', + 'result.cc', + 'scalar.cc', + 'sparse_tensor.cc', + 'status.cc', + 'table.cc', + 'table_builder.cc', + 'tensor.cc', + 'tensor/coo_converter.cc', + 'tensor/csf_converter.cc', + 'tensor/csx_converter.cc', + 'type.cc', + 'type_traits.cc', + 'visitor.cc', + 'c/bridge.cc', + 'c/dlpack.cc', +] + +arrow_lib = library( + 'arrow', + sources: [arrow_srcs], + objects: objlibs, + include_directories: [include_dir], + install: true, + # compute/expression.cc may have undefined IPC symbols in non-IPC builds + override_options: {'b_lundef': 'false'}, Review Comment: Why do we need this? ########## cpp/meson.build: ########## @@ -0,0 +1,59 @@ +# 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. + +project( + 'arrow', + 'cpp', + 'c', + version: '19.0.0-SNAPSHOT', + license: 'Apache 2.0', Review Comment: ```suggestion license: 'Apache-2.0', ``` ########## cpp/src/arrow/meson.build: ########## @@ -0,0 +1,333 @@ +# 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. + +include_dir = include_directories('..') + +dl_dep = dependency('dl') + +# Meson does not natively support object libraries +# https://github.com/mesonbuild/meson/issues/13843 +objlib_sources = { + 'arrow_array': { + 'sources': [ + 'array/array_base.cc', + 'array/array_binary.cc', + 'array/array_decimal.cc', + 'array/array_dict.cc', + 'array/array_nested.cc', + 'array/array_primitive.cc', + 'array/array_run_end.cc', + 'array/builder_adaptive.cc', + 'array/builder_base.cc', + 'array/builder_binary.cc', + 'array/builder_decimal.cc', + 'array/builder_dict.cc', + 'array/builder_run_end.cc', + 'array/builder_nested.cc', + 'array/builder_primitive.cc', + 'array/builder_union.cc', + 'array/concatenate.cc', + 'array/data.cc', + 'array/diff.cc', + 'array/statistics.cc', + 'array/util.cc', + 'array/validate.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_compute': { + 'sources': [ + 'compute/api_aggregate.cc', + 'compute/api_scalar.cc', + 'compute/api_vector.cc', + 'compute/cast.cc', + 'compute/exec.cc', + 'compute/expression.cc', + 'compute/function.cc', + 'compute/function_internal.cc', + 'compute/kernel.cc', + 'compute/ordering.cc', + 'compute/registry.cc', + 'compute/kernels/chunked_internal.cc', + 'compute/kernels/codegen_internal.cc', + 'compute/kernels/ree_util_internal.cc', + 'compute/kernels/scalar_cast_boolean.cc', + 'compute/kernels/scalar_cast_dictionary.cc', + 'compute/kernels/scalar_cast_extension.cc', + 'compute/kernels/scalar_cast_internal.cc', + 'compute/kernels/scalar_cast_nested.cc', + 'compute/kernels/scalar_cast_numeric.cc', + 'compute/kernels/scalar_cast_string.cc', + 'compute/kernels/scalar_cast_temporal.cc', + 'compute/kernels/util_internal.cc', + 'compute/kernels/vector_hash.cc', + 'compute/kernels/vector_selection.cc', + 'compute/kernels/vector_selection_filter_internal.cc', + 'compute/kernels/vector_selection_internal.cc', + 'compute/kernels/vector_selection_take_internal.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_io': { + 'sources': [ + 'io/buffered.cc', + 'io/caching.cc', + 'io/compressed.cc', + 'io/file.cc', + 'io/hdfs.cc', + 'io/hdfs_internal.cc', + 'io/interfaces.cc', + 'io/memory.cc', + 'io/slow.cc', + 'io/stdio.cc', + 'io/transform.cc', + ], + 'include_dirs': [ + include_dir, + include_directories('../../thirdparty/hadoop/include'), + ], + 'dependencies': [dl_dep], + }, + 'arrow_util': { + 'sources': [ + 'util/align_util.cc', + 'util/async_util.cc', + 'util/atfork_internal.cc', + 'util/basic_decimal.cc', + 'util/bit_block_counter.cc', + 'util/bit_run_reader.cc', + 'util/bit_util.cc', + 'util/bitmap.cc', + 'util/bitmap_builders.cc', + 'util/bitmap_ops.cc', + 'util/bpacking.cc', + 'util/byte_size.cc', + 'util/cancel.cc', + 'util/compression.cc', + 'util/counting_semaphore.cc', + 'util/cpu_info.cc', + 'util/crc32.cc', + 'util/debug.cc', + 'util/decimal.cc', + 'util/delimiting.cc', + 'util/dict_util.cc', + 'util/fixed_width_internal.cc', + 'util/float16.cc', + 'util/formatting.cc', + 'util/future.cc', + 'util/hashing.cc', + 'util/int_util.cc', + 'util/io_util.cc', + 'util/list_util.cc', + 'util/logger.cc', + 'util/logging.cc', + 'util/key_value_metadata.cc', + 'util/memory.cc', + 'util/mutex.cc', + 'util/ree_util.cc', + 'util/string.cc', + 'util/string_builder.cc', + 'util/task_group.cc', + 'util/tdigest.cc', + 'util/thread_pool.cc', + 'util/time.cc', + 'util/tracing.cc', + 'util/trie.cc', + 'util/union_util.cc', + 'util/unreachable.cc', + 'util/uri.cc', + 'util/utf8.cc', + 'util/value_parsing.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'memory_pool': { + 'sources': ['memory_pool.cc'], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'vendored': { + 'sources': [ + 'vendored/base64.cpp', + 'vendored/datetime.cpp', + 'vendored/double-conversion/bignum-dtoa.cc', + 'vendored/double-conversion/bignum.cc', + 'vendored/double-conversion/cached-powers.cc', + 'vendored/double-conversion/double-to-string.cc', + 'vendored/double-conversion/fast-dtoa.cc', + 'vendored/double-conversion/fixed-dtoa.cc', + 'vendored/double-conversion/string-to-double.cc', + 'vendored/double-conversion/strtod.cc', + 'vendored/musl/strptime.c', + 'vendored/uriparser/UriCommon.c', + 'vendored/uriparser/UriCompare.c', + 'vendored/uriparser/UriEscape.c', + 'vendored/uriparser/UriFile.c', + 'vendored/uriparser/UriIp4.c', + 'vendored/uriparser/UriIp4Base.c', + 'vendored/uriparser/UriMemory.c', + 'vendored/uriparser/UriNormalize.c', + 'vendored/uriparser/UriNormalizeBase.c', + 'vendored/uriparser/UriParse.c', + 'vendored/uriparser/UriParseBase.c', + 'vendored/uriparser/UriQuery.c', + 'vendored/uriparser/UriRecompose.c', + 'vendored/uriparser/UriResolve.c', + 'vendored/uriparser/UriShorten.c', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, +} + +objlibs = [] +foreach key, val : objlib_sources + slib = static_library( + key, + sources: val['sources'], + include_directories: val['include_dirs'], + dependencies: val['dependencies'], + build_by_default: false, + ) + objlibs += slib.extract_all_objects(recursive: true) +endforeach + +arrow_srcs = [ + 'builder.cc', + 'buffer.cc', + 'chunked_array.cc', + 'chunk_resolver.cc', + 'compare.cc', + 'config.cc', + 'datum.cc', + 'device.cc', + 'device_allocation_type_set.cc', + 'extension_type.cc', + 'extension/bool8.cc', + 'extension/json.cc', + 'extension/uuid.cc', + 'pretty_print.cc', + 'record_batch.cc', + 'result.cc', + 'scalar.cc', + 'sparse_tensor.cc', + 'status.cc', + 'table.cc', + 'table_builder.cc', + 'tensor.cc', + 'tensor/coo_converter.cc', + 'tensor/csf_converter.cc', + 'tensor/csx_converter.cc', + 'type.cc', + 'type_traits.cc', + 'visitor.cc', + 'c/bridge.cc', + 'c/dlpack.cc', +] + +arrow_lib = library( + 'arrow', + sources: [arrow_srcs], + objects: objlibs, + include_directories: [include_dir], + install: true, + # compute/expression.cc may have undefined IPC symbols in non-IPC builds + override_options: {'b_lundef': 'false'}, +) + +# Meson does not allow you to glob for headers to install. See also +# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard +# install_subdir would be usable if the directory only contained headers +install_headers( + [ + 'api.h', + 'array.h', + 'buffer_builder.h', + 'buffer.h', + 'builder.h', + 'chunked_array.h', + 'chunk_resolver.h', + 'compare.h', + 'config.h', + 'datum.h', + 'device_allocation_type_set.h', + 'device.h', + 'extension_type.h', + 'memory_pool.h', + 'memory_pool_test.h', + 'pch.h', + 'pretty_print.h', + 'record_batch.h', + 'result.h', + 'scalar.h', + 'sparse_tensor.h', + 'status.h', + 'stl_allocator.h', + 'stl.h', + 'stl_iterator.h', + 'table_builder.h', + 'table.h', + 'tensor.h', + 'type_fwd.h', + 'type.h', + 'type_traits.h', + 'visit_array_inline.h', + 'visit_data_inline.h', + 'visitor_generate.h', + 'visitor.h', + 'visit_scalar_inline.h', + 'visit_type_inline.h', + ], + install_dir: 'arrow', +) + +version = meson.project_version() +# Remove any pre-release / build identifiers +version_no_pre_release = version.split('-')[0] +version_no_build = version_no_pre_release.split('+')[0] +components = version_no_build.split('.') +assert( + components.length() >= 3, + 'The version does not contain major, minor and patch', +) +ver_major = components[0] +ver_minor = components[1] +ver_patch = components[2] + +arrow_version = ver_major.to_int() * 1000 + ver_minor.to_int() * 1000 + ver_patch.to_int() Review Comment: ```suggestion arrow_version = (ver_major.to_int() * 1000 + ver_minor.to_int()) * 1000 + ver_patch.to_int() ``` ########## cpp/src/arrow/util/meson.build: ########## @@ -0,0 +1,103 @@ +# 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. + +conf_data = configuration_data() + +conf_data.set('ARROW_VERSION_MAJOR', ver_major) +conf_data.set('ARROW_VERSION_MINOR', ver_minor) +conf_data.set('ARROW_VERSION_PATCH', ver_patch) + +conf_data.set('ARROW_VERSION', arrow_version) +conf_data.set('ARROW_VERSION_STRING', arrow_version) + +conf_data.set('ARROW_SO_VERSION', arrow_so_version) +conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version) + +# TODO: we may want to give Meson its own configuration file rather +# than backfitting onto CMake's +conf_data.set('CMAKE_CXX_COMPILER_ID', cpp_compiler.get_id()) +conf_data.set('CMAKE_CXX_COMPILER_VERSION', cpp_compiler.version()) +conf_data.set( + 'CMAKE_CXX_FLAGS', + ' '.join(cpp_compiler.get_supported_arguments()), +) + +conf_data.set('UPPERCASE_BUILD_TYPE', get_option('buildtype').to_upper()) + +conf_data.set('ARROW_PACKAGE_KIND', get_option('package_kind')) + +foreach cmakedefine : [ + 'ARROW_COMPUTE', + 'ARROW_CSV', + 'ARROW_CUDA', + 'ARROW_DATASET', + 'ARROW_FILESYSTEM', + 'ARROW_FLIGHT', + 'ARROW_FLIGHT_SQL', + 'ARROW_IPC', + 'ARROW_JEMALLOC', + 'ARROW_JEMALLOC_VENDORED', + 'ARROW_JSON', + 'ARROW_MIMALLOC', + 'ARROW_ORC', + 'ARROW_PARQUET', + 'ARROW_SUBSTRAIT', + 'ARROW_AZURE', + 'ARROW_ENABLE_THREADING', + 'ARROW_GCS', + 'ARROW_HDFS', + 'ARROW_S3', + 'ARROW_USE_GLOG', + 'ARROW_USE_NATIVE_INT128', + 'ARROW_WITH_BROTLI', + 'ARROW_WITH_BZ2', + 'ARROW_WITH_LZ4', + 'ARROW_WITH_MUSL', + 'ARROW_WITH_OPENTELEMETRY', + 'ARROW_WITH_RE2', + 'ARROW_WITH_SNAPPY', + 'ARROW_WITH_UCX', + 'ARROW_WITH_UTF8PROC', + 'ARROW_WITH_ZLIB', + 'ARROW_WITH_ZSTD', + 'PARQUET_REQUIRE_ENCRYPTION', +] + conf_data.set(cmakedefine, false) +endforeach + +configure_file( + input: 'config.h.cmake', + output: 'config.h', + configuration: conf_data, + format: 'cmake@', + install: true, + install_dir: 'arrow', +) + +internal_conf_data = configuration_data() + +internal_conf_data.set('ARROW_GIT_ID', git_id) +internal_conf_data.set('ARROW_GIT_DESCRIPTION', git_description) + +configure_file( + input: 'config_internal.h.cmake', + output: 'config_internal.h', + configuration: internal_conf_data, + format: 'cmake@', + install: true, + install_dir: 'arrow', Review Comment: We don't need to install `_internal.h`: ```suggestion ``` ########## cpp/src/arrow/meson.build: ########## @@ -0,0 +1,333 @@ +# 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. + +include_dir = include_directories('..') + +dl_dep = dependency('dl') + +# Meson does not natively support object libraries +# https://github.com/mesonbuild/meson/issues/13843 +objlib_sources = { + 'arrow_array': { + 'sources': [ + 'array/array_base.cc', + 'array/array_binary.cc', + 'array/array_decimal.cc', + 'array/array_dict.cc', + 'array/array_nested.cc', + 'array/array_primitive.cc', + 'array/array_run_end.cc', + 'array/builder_adaptive.cc', + 'array/builder_base.cc', + 'array/builder_binary.cc', + 'array/builder_decimal.cc', + 'array/builder_dict.cc', + 'array/builder_run_end.cc', + 'array/builder_nested.cc', + 'array/builder_primitive.cc', + 'array/builder_union.cc', + 'array/concatenate.cc', + 'array/data.cc', + 'array/diff.cc', + 'array/statistics.cc', + 'array/util.cc', + 'array/validate.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_compute': { + 'sources': [ + 'compute/api_aggregate.cc', + 'compute/api_scalar.cc', + 'compute/api_vector.cc', + 'compute/cast.cc', + 'compute/exec.cc', + 'compute/expression.cc', + 'compute/function.cc', + 'compute/function_internal.cc', + 'compute/kernel.cc', + 'compute/ordering.cc', + 'compute/registry.cc', + 'compute/kernels/chunked_internal.cc', + 'compute/kernels/codegen_internal.cc', + 'compute/kernels/ree_util_internal.cc', + 'compute/kernels/scalar_cast_boolean.cc', + 'compute/kernels/scalar_cast_dictionary.cc', + 'compute/kernels/scalar_cast_extension.cc', + 'compute/kernels/scalar_cast_internal.cc', + 'compute/kernels/scalar_cast_nested.cc', + 'compute/kernels/scalar_cast_numeric.cc', + 'compute/kernels/scalar_cast_string.cc', + 'compute/kernels/scalar_cast_temporal.cc', + 'compute/kernels/util_internal.cc', + 'compute/kernels/vector_hash.cc', + 'compute/kernels/vector_selection.cc', + 'compute/kernels/vector_selection_filter_internal.cc', + 'compute/kernels/vector_selection_internal.cc', + 'compute/kernels/vector_selection_take_internal.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_io': { + 'sources': [ + 'io/buffered.cc', + 'io/caching.cc', + 'io/compressed.cc', + 'io/file.cc', + 'io/hdfs.cc', + 'io/hdfs_internal.cc', + 'io/interfaces.cc', + 'io/memory.cc', + 'io/slow.cc', + 'io/stdio.cc', + 'io/transform.cc', + ], + 'include_dirs': [ + include_dir, + include_directories('../../thirdparty/hadoop/include'), + ], + 'dependencies': [dl_dep], + }, + 'arrow_util': { + 'sources': [ + 'util/align_util.cc', + 'util/async_util.cc', + 'util/atfork_internal.cc', + 'util/basic_decimal.cc', + 'util/bit_block_counter.cc', + 'util/bit_run_reader.cc', + 'util/bit_util.cc', + 'util/bitmap.cc', + 'util/bitmap_builders.cc', + 'util/bitmap_ops.cc', + 'util/bpacking.cc', + 'util/byte_size.cc', + 'util/cancel.cc', + 'util/compression.cc', + 'util/counting_semaphore.cc', + 'util/cpu_info.cc', + 'util/crc32.cc', + 'util/debug.cc', + 'util/decimal.cc', + 'util/delimiting.cc', + 'util/dict_util.cc', + 'util/fixed_width_internal.cc', + 'util/float16.cc', + 'util/formatting.cc', + 'util/future.cc', + 'util/hashing.cc', + 'util/int_util.cc', + 'util/io_util.cc', + 'util/list_util.cc', + 'util/logger.cc', + 'util/logging.cc', + 'util/key_value_metadata.cc', + 'util/memory.cc', + 'util/mutex.cc', + 'util/ree_util.cc', + 'util/string.cc', + 'util/string_builder.cc', + 'util/task_group.cc', + 'util/tdigest.cc', + 'util/thread_pool.cc', + 'util/time.cc', + 'util/tracing.cc', + 'util/trie.cc', + 'util/union_util.cc', + 'util/unreachable.cc', + 'util/uri.cc', + 'util/utf8.cc', + 'util/value_parsing.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'memory_pool': { + 'sources': ['memory_pool.cc'], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'vendored': { + 'sources': [ + 'vendored/base64.cpp', + 'vendored/datetime.cpp', + 'vendored/double-conversion/bignum-dtoa.cc', + 'vendored/double-conversion/bignum.cc', + 'vendored/double-conversion/cached-powers.cc', + 'vendored/double-conversion/double-to-string.cc', + 'vendored/double-conversion/fast-dtoa.cc', + 'vendored/double-conversion/fixed-dtoa.cc', + 'vendored/double-conversion/string-to-double.cc', + 'vendored/double-conversion/strtod.cc', + 'vendored/musl/strptime.c', + 'vendored/uriparser/UriCommon.c', + 'vendored/uriparser/UriCompare.c', + 'vendored/uriparser/UriEscape.c', + 'vendored/uriparser/UriFile.c', + 'vendored/uriparser/UriIp4.c', + 'vendored/uriparser/UriIp4Base.c', + 'vendored/uriparser/UriMemory.c', + 'vendored/uriparser/UriNormalize.c', + 'vendored/uriparser/UriNormalizeBase.c', + 'vendored/uriparser/UriParse.c', + 'vendored/uriparser/UriParseBase.c', + 'vendored/uriparser/UriQuery.c', + 'vendored/uriparser/UriRecompose.c', + 'vendored/uriparser/UriResolve.c', + 'vendored/uriparser/UriShorten.c', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, +} + +objlibs = [] +foreach key, val : objlib_sources + slib = static_library( + key, + sources: val['sources'], + include_directories: val['include_dirs'], + dependencies: val['dependencies'], + build_by_default: false, + ) + objlibs += slib.extract_all_objects(recursive: true) +endforeach + +arrow_srcs = [ + 'builder.cc', + 'buffer.cc', + 'chunked_array.cc', + 'chunk_resolver.cc', + 'compare.cc', + 'config.cc', + 'datum.cc', + 'device.cc', + 'device_allocation_type_set.cc', + 'extension_type.cc', + 'extension/bool8.cc', + 'extension/json.cc', + 'extension/uuid.cc', + 'pretty_print.cc', + 'record_batch.cc', + 'result.cc', + 'scalar.cc', + 'sparse_tensor.cc', + 'status.cc', + 'table.cc', + 'table_builder.cc', + 'tensor.cc', + 'tensor/coo_converter.cc', + 'tensor/csf_converter.cc', + 'tensor/csx_converter.cc', + 'type.cc', + 'type_traits.cc', + 'visitor.cc', + 'c/bridge.cc', + 'c/dlpack.cc', +] + +arrow_lib = library( + 'arrow', + sources: [arrow_srcs], + objects: objlibs, + include_directories: [include_dir], + install: true, + # compute/expression.cc may have undefined IPC symbols in non-IPC builds + override_options: {'b_lundef': 'false'}, +) + +# Meson does not allow you to glob for headers to install. See also +# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard +# install_subdir would be usable if the directory only contained headers +install_headers( + [ + 'api.h', + 'array.h', + 'buffer_builder.h', + 'buffer.h', + 'builder.h', + 'chunked_array.h', + 'chunk_resolver.h', + 'compare.h', + 'config.h', + 'datum.h', + 'device_allocation_type_set.h', + 'device.h', + 'extension_type.h', + 'memory_pool.h', + 'memory_pool_test.h', + 'pch.h', + 'pretty_print.h', + 'record_batch.h', + 'result.h', + 'scalar.h', + 'sparse_tensor.h', + 'status.h', + 'stl_allocator.h', + 'stl.h', + 'stl_iterator.h', + 'table_builder.h', + 'table.h', + 'tensor.h', + 'type_fwd.h', + 'type.h', + 'type_traits.h', + 'visit_array_inline.h', + 'visit_data_inline.h', + 'visitor_generate.h', + 'visitor.h', + 'visit_scalar_inline.h', + 'visit_type_inline.h', + ], + install_dir: 'arrow', +) + +version = meson.project_version() +# Remove any pre-release / build identifiers +version_no_pre_release = version.split('-')[0] +version_no_build = version_no_pre_release.split('+')[0] +components = version_no_build.split('.') +assert( + components.length() >= 3, + 'The version does not contain major, minor and patch', +) +ver_major = components[0] +ver_minor = components[1] +ver_patch = components[2] Review Comment: How about using `version_XXX` for consistency with `version_no_snapshot`? ```suggestion version_major = components[0] version_minor = components[1] version_patch = components[2] ``` ########## cpp/src/arrow/util/meson.build: ########## @@ -0,0 +1,103 @@ +# 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. + +conf_data = configuration_data() + +conf_data.set('ARROW_VERSION_MAJOR', ver_major) +conf_data.set('ARROW_VERSION_MINOR', ver_minor) +conf_data.set('ARROW_VERSION_PATCH', ver_patch) + +conf_data.set('ARROW_VERSION', arrow_version) +conf_data.set('ARROW_VERSION_STRING', arrow_version) + +conf_data.set('ARROW_SO_VERSION', arrow_so_version) +conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version) + +# TODO: we may want to give Meson its own configuration file rather +# than backfitting onto CMake's +conf_data.set('CMAKE_CXX_COMPILER_ID', cpp_compiler.get_id()) +conf_data.set('CMAKE_CXX_COMPILER_VERSION', cpp_compiler.version()) +conf_data.set( + 'CMAKE_CXX_FLAGS', + ' '.join(cpp_compiler.get_supported_arguments()), +) + +conf_data.set('UPPERCASE_BUILD_TYPE', get_option('buildtype').to_upper()) + +conf_data.set('ARROW_PACKAGE_KIND', get_option('package_kind')) + +foreach cmakedefine : [ + 'ARROW_COMPUTE', + 'ARROW_CSV', + 'ARROW_CUDA', + 'ARROW_DATASET', + 'ARROW_FILESYSTEM', + 'ARROW_FLIGHT', + 'ARROW_FLIGHT_SQL', + 'ARROW_IPC', + 'ARROW_JEMALLOC', + 'ARROW_JEMALLOC_VENDORED', + 'ARROW_JSON', + 'ARROW_MIMALLOC', + 'ARROW_ORC', + 'ARROW_PARQUET', + 'ARROW_SUBSTRAIT', + 'ARROW_AZURE', + 'ARROW_ENABLE_THREADING', + 'ARROW_GCS', + 'ARROW_HDFS', + 'ARROW_S3', + 'ARROW_USE_GLOG', + 'ARROW_USE_NATIVE_INT128', + 'ARROW_WITH_BROTLI', + 'ARROW_WITH_BZ2', + 'ARROW_WITH_LZ4', + 'ARROW_WITH_MUSL', + 'ARROW_WITH_OPENTELEMETRY', + 'ARROW_WITH_RE2', + 'ARROW_WITH_SNAPPY', + 'ARROW_WITH_UCX', + 'ARROW_WITH_UTF8PROC', + 'ARROW_WITH_ZLIB', + 'ARROW_WITH_ZSTD', + 'PARQUET_REQUIRE_ENCRYPTION', +] + conf_data.set(cmakedefine, false) +endforeach + +configure_file( + input: 'config.h.cmake', + output: 'config.h', + configuration: conf_data, + format: 'cmake@', + install: true, + install_dir: 'arrow', Review Comment: ```suggestion install_dir: 'arrow/util', ``` ########## cpp/src/arrow/meson.build: ########## @@ -0,0 +1,333 @@ +# 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. + +include_dir = include_directories('..') + +dl_dep = dependency('dl') + +# Meson does not natively support object libraries +# https://github.com/mesonbuild/meson/issues/13843 +objlib_sources = { + 'arrow_array': { + 'sources': [ + 'array/array_base.cc', + 'array/array_binary.cc', + 'array/array_decimal.cc', + 'array/array_dict.cc', + 'array/array_nested.cc', + 'array/array_primitive.cc', + 'array/array_run_end.cc', + 'array/builder_adaptive.cc', + 'array/builder_base.cc', + 'array/builder_binary.cc', + 'array/builder_decimal.cc', + 'array/builder_dict.cc', + 'array/builder_run_end.cc', + 'array/builder_nested.cc', + 'array/builder_primitive.cc', + 'array/builder_union.cc', + 'array/concatenate.cc', + 'array/data.cc', + 'array/diff.cc', + 'array/statistics.cc', + 'array/util.cc', + 'array/validate.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_compute': { + 'sources': [ + 'compute/api_aggregate.cc', + 'compute/api_scalar.cc', + 'compute/api_vector.cc', + 'compute/cast.cc', + 'compute/exec.cc', + 'compute/expression.cc', + 'compute/function.cc', + 'compute/function_internal.cc', + 'compute/kernel.cc', + 'compute/ordering.cc', + 'compute/registry.cc', + 'compute/kernels/chunked_internal.cc', + 'compute/kernels/codegen_internal.cc', + 'compute/kernels/ree_util_internal.cc', + 'compute/kernels/scalar_cast_boolean.cc', + 'compute/kernels/scalar_cast_dictionary.cc', + 'compute/kernels/scalar_cast_extension.cc', + 'compute/kernels/scalar_cast_internal.cc', + 'compute/kernels/scalar_cast_nested.cc', + 'compute/kernels/scalar_cast_numeric.cc', + 'compute/kernels/scalar_cast_string.cc', + 'compute/kernels/scalar_cast_temporal.cc', + 'compute/kernels/util_internal.cc', + 'compute/kernels/vector_hash.cc', + 'compute/kernels/vector_selection.cc', + 'compute/kernels/vector_selection_filter_internal.cc', + 'compute/kernels/vector_selection_internal.cc', + 'compute/kernels/vector_selection_take_internal.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_io': { + 'sources': [ + 'io/buffered.cc', + 'io/caching.cc', + 'io/compressed.cc', + 'io/file.cc', + 'io/hdfs.cc', + 'io/hdfs_internal.cc', + 'io/interfaces.cc', + 'io/memory.cc', + 'io/slow.cc', + 'io/stdio.cc', + 'io/transform.cc', + ], + 'include_dirs': [ + include_dir, + include_directories('../../thirdparty/hadoop/include'), + ], + 'dependencies': [dl_dep], + }, + 'arrow_util': { + 'sources': [ + 'util/align_util.cc', + 'util/async_util.cc', + 'util/atfork_internal.cc', + 'util/basic_decimal.cc', + 'util/bit_block_counter.cc', + 'util/bit_run_reader.cc', + 'util/bit_util.cc', + 'util/bitmap.cc', + 'util/bitmap_builders.cc', + 'util/bitmap_ops.cc', + 'util/bpacking.cc', + 'util/byte_size.cc', + 'util/cancel.cc', + 'util/compression.cc', + 'util/counting_semaphore.cc', + 'util/cpu_info.cc', + 'util/crc32.cc', + 'util/debug.cc', + 'util/decimal.cc', + 'util/delimiting.cc', + 'util/dict_util.cc', + 'util/fixed_width_internal.cc', + 'util/float16.cc', + 'util/formatting.cc', + 'util/future.cc', + 'util/hashing.cc', + 'util/int_util.cc', + 'util/io_util.cc', + 'util/list_util.cc', + 'util/logger.cc', + 'util/logging.cc', + 'util/key_value_metadata.cc', + 'util/memory.cc', + 'util/mutex.cc', + 'util/ree_util.cc', + 'util/string.cc', + 'util/string_builder.cc', + 'util/task_group.cc', + 'util/tdigest.cc', + 'util/thread_pool.cc', + 'util/time.cc', + 'util/tracing.cc', + 'util/trie.cc', + 'util/union_util.cc', + 'util/unreachable.cc', + 'util/uri.cc', + 'util/utf8.cc', + 'util/value_parsing.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'memory_pool': { + 'sources': ['memory_pool.cc'], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'vendored': { + 'sources': [ + 'vendored/base64.cpp', + 'vendored/datetime.cpp', + 'vendored/double-conversion/bignum-dtoa.cc', + 'vendored/double-conversion/bignum.cc', + 'vendored/double-conversion/cached-powers.cc', + 'vendored/double-conversion/double-to-string.cc', + 'vendored/double-conversion/fast-dtoa.cc', + 'vendored/double-conversion/fixed-dtoa.cc', + 'vendored/double-conversion/string-to-double.cc', + 'vendored/double-conversion/strtod.cc', + 'vendored/musl/strptime.c', + 'vendored/uriparser/UriCommon.c', + 'vendored/uriparser/UriCompare.c', + 'vendored/uriparser/UriEscape.c', + 'vendored/uriparser/UriFile.c', + 'vendored/uriparser/UriIp4.c', + 'vendored/uriparser/UriIp4Base.c', + 'vendored/uriparser/UriMemory.c', + 'vendored/uriparser/UriNormalize.c', + 'vendored/uriparser/UriNormalizeBase.c', + 'vendored/uriparser/UriParse.c', + 'vendored/uriparser/UriParseBase.c', + 'vendored/uriparser/UriQuery.c', + 'vendored/uriparser/UriRecompose.c', + 'vendored/uriparser/UriResolve.c', + 'vendored/uriparser/UriShorten.c', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, +} + +objlibs = [] +foreach key, val : objlib_sources + slib = static_library( + key, + sources: val['sources'], + include_directories: val['include_dirs'], + dependencies: val['dependencies'], + build_by_default: false, + ) + objlibs += slib.extract_all_objects(recursive: true) +endforeach + +arrow_srcs = [ + 'builder.cc', + 'buffer.cc', + 'chunked_array.cc', + 'chunk_resolver.cc', + 'compare.cc', + 'config.cc', + 'datum.cc', + 'device.cc', + 'device_allocation_type_set.cc', + 'extension_type.cc', + 'extension/bool8.cc', + 'extension/json.cc', + 'extension/uuid.cc', + 'pretty_print.cc', + 'record_batch.cc', + 'result.cc', + 'scalar.cc', + 'sparse_tensor.cc', + 'status.cc', + 'table.cc', + 'table_builder.cc', + 'tensor.cc', + 'tensor/coo_converter.cc', + 'tensor/csf_converter.cc', + 'tensor/csx_converter.cc', + 'type.cc', + 'type_traits.cc', + 'visitor.cc', + 'c/bridge.cc', + 'c/dlpack.cc', +] + +arrow_lib = library( + 'arrow', + sources: [arrow_srcs], + objects: objlibs, + include_directories: [include_dir], + install: true, + # compute/expression.cc may have undefined IPC symbols in non-IPC builds + override_options: {'b_lundef': 'false'}, +) + +# Meson does not allow you to glob for headers to install. See also +# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard +# install_subdir would be usable if the directory only contained headers +install_headers( + [ + 'api.h', + 'array.h', + 'buffer_builder.h', + 'buffer.h', + 'builder.h', + 'chunked_array.h', + 'chunk_resolver.h', + 'compare.h', + 'config.h', + 'datum.h', + 'device_allocation_type_set.h', + 'device.h', + 'extension_type.h', + 'memory_pool.h', + 'memory_pool_test.h', + 'pch.h', + 'pretty_print.h', + 'record_batch.h', + 'result.h', + 'scalar.h', + 'sparse_tensor.h', + 'status.h', + 'stl_allocator.h', + 'stl.h', + 'stl_iterator.h', + 'table_builder.h', + 'table.h', + 'tensor.h', + 'type_fwd.h', + 'type.h', + 'type_traits.h', + 'visit_array_inline.h', + 'visit_data_inline.h', + 'visitor_generate.h', + 'visitor.h', + 'visit_scalar_inline.h', + 'visit_type_inline.h', + ], + install_dir: 'arrow', +) + +version = meson.project_version() +# Remove any pre-release / build identifiers +version_no_pre_release = version.split('-')[0] +version_no_build = version_no_pre_release.split('+')[0] +components = version_no_build.split('.') Review Comment: We use only `-SNAPSHOT` suffix. ```suggestion # Remove -SNAPSHOT version_no_snapshot = version.split('-SNAPSHOT')[0] components = version_no_snapshot.split('.') ``` ########## cpp/src/arrow/meson.build: ########## @@ -0,0 +1,333 @@ +# 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. + +include_dir = include_directories('..') + +dl_dep = dependency('dl') + +# Meson does not natively support object libraries +# https://github.com/mesonbuild/meson/issues/13843 +objlib_sources = { Review Comment: We don't need to emulate objlib in Meson. It's just for faster build. We can just use `library()`. ########## cpp/src/arrow/meson.build: ########## @@ -0,0 +1,333 @@ +# 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. + +include_dir = include_directories('..') + +dl_dep = dependency('dl') + +# Meson does not natively support object libraries +# https://github.com/mesonbuild/meson/issues/13843 +objlib_sources = { + 'arrow_array': { + 'sources': [ + 'array/array_base.cc', + 'array/array_binary.cc', + 'array/array_decimal.cc', + 'array/array_dict.cc', + 'array/array_nested.cc', + 'array/array_primitive.cc', + 'array/array_run_end.cc', + 'array/builder_adaptive.cc', + 'array/builder_base.cc', + 'array/builder_binary.cc', + 'array/builder_decimal.cc', + 'array/builder_dict.cc', + 'array/builder_run_end.cc', + 'array/builder_nested.cc', + 'array/builder_primitive.cc', + 'array/builder_union.cc', + 'array/concatenate.cc', + 'array/data.cc', + 'array/diff.cc', + 'array/statistics.cc', + 'array/util.cc', + 'array/validate.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_compute': { + 'sources': [ + 'compute/api_aggregate.cc', + 'compute/api_scalar.cc', + 'compute/api_vector.cc', + 'compute/cast.cc', + 'compute/exec.cc', + 'compute/expression.cc', + 'compute/function.cc', + 'compute/function_internal.cc', + 'compute/kernel.cc', + 'compute/ordering.cc', + 'compute/registry.cc', + 'compute/kernels/chunked_internal.cc', + 'compute/kernels/codegen_internal.cc', + 'compute/kernels/ree_util_internal.cc', + 'compute/kernels/scalar_cast_boolean.cc', + 'compute/kernels/scalar_cast_dictionary.cc', + 'compute/kernels/scalar_cast_extension.cc', + 'compute/kernels/scalar_cast_internal.cc', + 'compute/kernels/scalar_cast_nested.cc', + 'compute/kernels/scalar_cast_numeric.cc', + 'compute/kernels/scalar_cast_string.cc', + 'compute/kernels/scalar_cast_temporal.cc', + 'compute/kernels/util_internal.cc', + 'compute/kernels/vector_hash.cc', + 'compute/kernels/vector_selection.cc', + 'compute/kernels/vector_selection_filter_internal.cc', + 'compute/kernels/vector_selection_internal.cc', + 'compute/kernels/vector_selection_take_internal.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_io': { + 'sources': [ + 'io/buffered.cc', + 'io/caching.cc', + 'io/compressed.cc', + 'io/file.cc', + 'io/hdfs.cc', + 'io/hdfs_internal.cc', + 'io/interfaces.cc', + 'io/memory.cc', + 'io/slow.cc', + 'io/stdio.cc', + 'io/transform.cc', + ], + 'include_dirs': [ + include_dir, + include_directories('../../thirdparty/hadoop/include'), + ], + 'dependencies': [dl_dep], + }, + 'arrow_util': { + 'sources': [ + 'util/align_util.cc', + 'util/async_util.cc', + 'util/atfork_internal.cc', + 'util/basic_decimal.cc', + 'util/bit_block_counter.cc', + 'util/bit_run_reader.cc', + 'util/bit_util.cc', + 'util/bitmap.cc', + 'util/bitmap_builders.cc', + 'util/bitmap_ops.cc', + 'util/bpacking.cc', + 'util/byte_size.cc', + 'util/cancel.cc', + 'util/compression.cc', + 'util/counting_semaphore.cc', + 'util/cpu_info.cc', + 'util/crc32.cc', + 'util/debug.cc', + 'util/decimal.cc', + 'util/delimiting.cc', + 'util/dict_util.cc', + 'util/fixed_width_internal.cc', + 'util/float16.cc', + 'util/formatting.cc', + 'util/future.cc', + 'util/hashing.cc', + 'util/int_util.cc', + 'util/io_util.cc', + 'util/list_util.cc', + 'util/logger.cc', + 'util/logging.cc', + 'util/key_value_metadata.cc', + 'util/memory.cc', + 'util/mutex.cc', + 'util/ree_util.cc', + 'util/string.cc', + 'util/string_builder.cc', + 'util/task_group.cc', + 'util/tdigest.cc', + 'util/thread_pool.cc', + 'util/time.cc', + 'util/tracing.cc', + 'util/trie.cc', + 'util/union_util.cc', + 'util/unreachable.cc', + 'util/uri.cc', + 'util/utf8.cc', + 'util/value_parsing.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'memory_pool': { + 'sources': ['memory_pool.cc'], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'vendored': { + 'sources': [ + 'vendored/base64.cpp', + 'vendored/datetime.cpp', + 'vendored/double-conversion/bignum-dtoa.cc', + 'vendored/double-conversion/bignum.cc', + 'vendored/double-conversion/cached-powers.cc', + 'vendored/double-conversion/double-to-string.cc', + 'vendored/double-conversion/fast-dtoa.cc', + 'vendored/double-conversion/fixed-dtoa.cc', + 'vendored/double-conversion/string-to-double.cc', + 'vendored/double-conversion/strtod.cc', + 'vendored/musl/strptime.c', + 'vendored/uriparser/UriCommon.c', + 'vendored/uriparser/UriCompare.c', + 'vendored/uriparser/UriEscape.c', + 'vendored/uriparser/UriFile.c', + 'vendored/uriparser/UriIp4.c', + 'vendored/uriparser/UriIp4Base.c', + 'vendored/uriparser/UriMemory.c', + 'vendored/uriparser/UriNormalize.c', + 'vendored/uriparser/UriNormalizeBase.c', + 'vendored/uriparser/UriParse.c', + 'vendored/uriparser/UriParseBase.c', + 'vendored/uriparser/UriQuery.c', + 'vendored/uriparser/UriRecompose.c', + 'vendored/uriparser/UriResolve.c', + 'vendored/uriparser/UriShorten.c', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, +} + +objlibs = [] +foreach key, val : objlib_sources + slib = static_library( + key, + sources: val['sources'], + include_directories: val['include_dirs'], + dependencies: val['dependencies'], + build_by_default: false, + ) + objlibs += slib.extract_all_objects(recursive: true) +endforeach + +arrow_srcs = [ + 'builder.cc', + 'buffer.cc', + 'chunked_array.cc', + 'chunk_resolver.cc', + 'compare.cc', + 'config.cc', + 'datum.cc', + 'device.cc', + 'device_allocation_type_set.cc', + 'extension_type.cc', + 'extension/bool8.cc', + 'extension/json.cc', + 'extension/uuid.cc', + 'pretty_print.cc', + 'record_batch.cc', + 'result.cc', + 'scalar.cc', + 'sparse_tensor.cc', + 'status.cc', + 'table.cc', + 'table_builder.cc', + 'tensor.cc', + 'tensor/coo_converter.cc', + 'tensor/csf_converter.cc', + 'tensor/csx_converter.cc', + 'type.cc', + 'type_traits.cc', + 'visitor.cc', + 'c/bridge.cc', + 'c/dlpack.cc', +] + +arrow_lib = library( + 'arrow', + sources: [arrow_srcs], + objects: objlibs, + include_directories: [include_dir], + install: true, + # compute/expression.cc may have undefined IPC symbols in non-IPC builds + override_options: {'b_lundef': 'false'}, +) + +# Meson does not allow you to glob for headers to install. See also +# https://mesonbuild.com/FAQ.html#why-cant-i-specify-target-files-with-a-wildcard +# install_subdir would be usable if the directory only contained headers +install_headers( + [ + 'api.h', + 'array.h', + 'buffer_builder.h', + 'buffer.h', + 'builder.h', + 'chunked_array.h', + 'chunk_resolver.h', + 'compare.h', + 'config.h', + 'datum.h', + 'device_allocation_type_set.h', + 'device.h', + 'extension_type.h', + 'memory_pool.h', + 'memory_pool_test.h', + 'pch.h', + 'pretty_print.h', + 'record_batch.h', + 'result.h', + 'scalar.h', + 'sparse_tensor.h', + 'status.h', + 'stl_allocator.h', + 'stl.h', + 'stl_iterator.h', + 'table_builder.h', + 'table.h', + 'tensor.h', + 'type_fwd.h', + 'type.h', + 'type_traits.h', + 'visit_array_inline.h', + 'visit_data_inline.h', + 'visitor_generate.h', + 'visitor.h', + 'visit_scalar_inline.h', + 'visit_type_inline.h', + ], + install_dir: 'arrow', +) + +version = meson.project_version() +# Remove any pre-release / build identifiers +version_no_pre_release = version.split('-')[0] +version_no_build = version_no_pre_release.split('+')[0] +components = version_no_build.split('.') +assert( + components.length() >= 3, + 'The version does not contain major, minor and patch', +) +ver_major = components[0] +ver_minor = components[1] +ver_patch = components[2] + +arrow_version = ver_major.to_int() * 1000 + ver_minor.to_int() * 1000 + ver_patch.to_int() +arrow_so_version = (ver_major.to_int() * 100 + ver_minor.to_int()).to_string() +arrow_full_so_version = '@0@.@1@.@2@'.format(arrow_so_version, ver_patch, 0) + +# TODO: The Meson generated .pc file does not include the Apache license Review Comment: We don't need it. `arrow.pc.in` has the license header because it's in this repository. Files that don't exist in this repository don't need it. ########## cpp/src/arrow/util/meson.build: ########## @@ -0,0 +1,103 @@ +# 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. + +conf_data = configuration_data() + +conf_data.set('ARROW_VERSION_MAJOR', ver_major) +conf_data.set('ARROW_VERSION_MINOR', ver_minor) +conf_data.set('ARROW_VERSION_PATCH', ver_patch) + +conf_data.set('ARROW_VERSION', arrow_version) +conf_data.set('ARROW_VERSION_STRING', arrow_version) + +conf_data.set('ARROW_SO_VERSION', arrow_so_version) +conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version) + +# TODO: we may want to give Meson its own configuration file rather Review Comment: We want to use `config.h.cmake` for both CMake and Meson (with `format: 'cmake@'`). It's for reducing maintenance cost. ########## cpp/src/arrow/meson.build: ########## @@ -0,0 +1,333 @@ +# 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. + +include_dir = include_directories('..') + +dl_dep = dependency('dl') + +# Meson does not natively support object libraries +# https://github.com/mesonbuild/meson/issues/13843 +objlib_sources = { + 'arrow_array': { + 'sources': [ + 'array/array_base.cc', + 'array/array_binary.cc', + 'array/array_decimal.cc', + 'array/array_dict.cc', + 'array/array_nested.cc', + 'array/array_primitive.cc', + 'array/array_run_end.cc', + 'array/builder_adaptive.cc', + 'array/builder_base.cc', + 'array/builder_binary.cc', + 'array/builder_decimal.cc', + 'array/builder_dict.cc', + 'array/builder_run_end.cc', + 'array/builder_nested.cc', + 'array/builder_primitive.cc', + 'array/builder_union.cc', + 'array/concatenate.cc', + 'array/data.cc', + 'array/diff.cc', + 'array/statistics.cc', + 'array/util.cc', + 'array/validate.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_compute': { + 'sources': [ + 'compute/api_aggregate.cc', + 'compute/api_scalar.cc', + 'compute/api_vector.cc', + 'compute/cast.cc', + 'compute/exec.cc', + 'compute/expression.cc', + 'compute/function.cc', + 'compute/function_internal.cc', + 'compute/kernel.cc', + 'compute/ordering.cc', + 'compute/registry.cc', + 'compute/kernels/chunked_internal.cc', + 'compute/kernels/codegen_internal.cc', + 'compute/kernels/ree_util_internal.cc', + 'compute/kernels/scalar_cast_boolean.cc', + 'compute/kernels/scalar_cast_dictionary.cc', + 'compute/kernels/scalar_cast_extension.cc', + 'compute/kernels/scalar_cast_internal.cc', + 'compute/kernels/scalar_cast_nested.cc', + 'compute/kernels/scalar_cast_numeric.cc', + 'compute/kernels/scalar_cast_string.cc', + 'compute/kernels/scalar_cast_temporal.cc', + 'compute/kernels/util_internal.cc', + 'compute/kernels/vector_hash.cc', + 'compute/kernels/vector_selection.cc', + 'compute/kernels/vector_selection_filter_internal.cc', + 'compute/kernels/vector_selection_internal.cc', + 'compute/kernels/vector_selection_take_internal.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'arrow_io': { + 'sources': [ + 'io/buffered.cc', + 'io/caching.cc', + 'io/compressed.cc', + 'io/file.cc', + 'io/hdfs.cc', + 'io/hdfs_internal.cc', + 'io/interfaces.cc', + 'io/memory.cc', + 'io/slow.cc', + 'io/stdio.cc', + 'io/transform.cc', + ], + 'include_dirs': [ + include_dir, + include_directories('../../thirdparty/hadoop/include'), + ], + 'dependencies': [dl_dep], + }, + 'arrow_util': { + 'sources': [ + 'util/align_util.cc', + 'util/async_util.cc', + 'util/atfork_internal.cc', + 'util/basic_decimal.cc', + 'util/bit_block_counter.cc', + 'util/bit_run_reader.cc', + 'util/bit_util.cc', + 'util/bitmap.cc', + 'util/bitmap_builders.cc', + 'util/bitmap_ops.cc', + 'util/bpacking.cc', + 'util/byte_size.cc', + 'util/cancel.cc', + 'util/compression.cc', + 'util/counting_semaphore.cc', + 'util/cpu_info.cc', + 'util/crc32.cc', + 'util/debug.cc', + 'util/decimal.cc', + 'util/delimiting.cc', + 'util/dict_util.cc', + 'util/fixed_width_internal.cc', + 'util/float16.cc', + 'util/formatting.cc', + 'util/future.cc', + 'util/hashing.cc', + 'util/int_util.cc', + 'util/io_util.cc', + 'util/list_util.cc', + 'util/logger.cc', + 'util/logging.cc', + 'util/key_value_metadata.cc', + 'util/memory.cc', + 'util/mutex.cc', + 'util/ree_util.cc', + 'util/string.cc', + 'util/string_builder.cc', + 'util/task_group.cc', + 'util/tdigest.cc', + 'util/thread_pool.cc', + 'util/time.cc', + 'util/tracing.cc', + 'util/trie.cc', + 'util/union_util.cc', + 'util/unreachable.cc', + 'util/uri.cc', + 'util/utf8.cc', + 'util/value_parsing.cc', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'memory_pool': { + 'sources': ['memory_pool.cc'], + 'include_dirs': [include_dir], + 'dependencies': [], + }, + 'vendored': { + 'sources': [ + 'vendored/base64.cpp', + 'vendored/datetime.cpp', + 'vendored/double-conversion/bignum-dtoa.cc', + 'vendored/double-conversion/bignum.cc', + 'vendored/double-conversion/cached-powers.cc', + 'vendored/double-conversion/double-to-string.cc', + 'vendored/double-conversion/fast-dtoa.cc', + 'vendored/double-conversion/fixed-dtoa.cc', + 'vendored/double-conversion/string-to-double.cc', + 'vendored/double-conversion/strtod.cc', + 'vendored/musl/strptime.c', + 'vendored/uriparser/UriCommon.c', + 'vendored/uriparser/UriCompare.c', + 'vendored/uriparser/UriEscape.c', + 'vendored/uriparser/UriFile.c', + 'vendored/uriparser/UriIp4.c', + 'vendored/uriparser/UriIp4Base.c', + 'vendored/uriparser/UriMemory.c', + 'vendored/uriparser/UriNormalize.c', + 'vendored/uriparser/UriNormalizeBase.c', + 'vendored/uriparser/UriParse.c', + 'vendored/uriparser/UriParseBase.c', + 'vendored/uriparser/UriQuery.c', + 'vendored/uriparser/UriRecompose.c', + 'vendored/uriparser/UriResolve.c', + 'vendored/uriparser/UriShorten.c', + ], + 'include_dirs': [include_dir], + 'dependencies': [], + }, +} + +objlibs = [] +foreach key, val : objlib_sources + slib = static_library( + key, + sources: val['sources'], + include_directories: val['include_dirs'], + dependencies: val['dependencies'], + build_by_default: false, + ) + objlibs += slib.extract_all_objects(recursive: true) +endforeach + +arrow_srcs = [ + 'builder.cc', + 'buffer.cc', + 'chunked_array.cc', + 'chunk_resolver.cc', + 'compare.cc', + 'config.cc', + 'datum.cc', + 'device.cc', + 'device_allocation_type_set.cc', + 'extension_type.cc', + 'extension/bool8.cc', + 'extension/json.cc', + 'extension/uuid.cc', + 'pretty_print.cc', + 'record_batch.cc', + 'result.cc', + 'scalar.cc', + 'sparse_tensor.cc', + 'status.cc', + 'table.cc', + 'table_builder.cc', + 'tensor.cc', + 'tensor/coo_converter.cc', + 'tensor/csf_converter.cc', + 'tensor/csx_converter.cc', + 'type.cc', + 'type_traits.cc', + 'visitor.cc', + 'c/bridge.cc', + 'c/dlpack.cc', +] + +arrow_lib = library( + 'arrow', + sources: [arrow_srcs], + objects: objlibs, + include_directories: [include_dir], + install: true, + # compute/expression.cc may have undefined IPC symbols in non-IPC builds Review Comment: Ah, we should disable features that depend on IPC in `cpp/src/arrow/compute/expression.cc` like GH-45171. Could you open an issue for this? ########## cpp/src/arrow/util/meson.build: ########## @@ -0,0 +1,103 @@ +# 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. + +conf_data = configuration_data() + +conf_data.set('ARROW_VERSION_MAJOR', ver_major) +conf_data.set('ARROW_VERSION_MINOR', ver_minor) +conf_data.set('ARROW_VERSION_PATCH', ver_patch) + +conf_data.set('ARROW_VERSION', arrow_version) +conf_data.set('ARROW_VERSION_STRING', arrow_version) + +conf_data.set('ARROW_SO_VERSION', arrow_so_version) +conf_data.set('ARROW_FULL_SO_VERSION', arrow_full_so_version) + +# TODO: we may want to give Meson its own configuration file rather +# than backfitting onto CMake's +conf_data.set('CMAKE_CXX_COMPILER_ID', cpp_compiler.get_id()) +conf_data.set('CMAKE_CXX_COMPILER_VERSION', cpp_compiler.version()) +conf_data.set( + 'CMAKE_CXX_FLAGS', + ' '.join(cpp_compiler.get_supported_arguments()), +) + +conf_data.set('UPPERCASE_BUILD_TYPE', get_option('buildtype').to_upper()) + +conf_data.set('ARROW_PACKAGE_KIND', get_option('package_kind')) + +foreach cmakedefine : [ + 'ARROW_COMPUTE', + 'ARROW_CSV', + 'ARROW_CUDA', + 'ARROW_DATASET', + 'ARROW_FILESYSTEM', + 'ARROW_FLIGHT', + 'ARROW_FLIGHT_SQL', + 'ARROW_IPC', + 'ARROW_JEMALLOC', + 'ARROW_JEMALLOC_VENDORED', + 'ARROW_JSON', + 'ARROW_MIMALLOC', + 'ARROW_ORC', + 'ARROW_PARQUET', + 'ARROW_SUBSTRAIT', + 'ARROW_AZURE', + 'ARROW_ENABLE_THREADING', + 'ARROW_GCS', + 'ARROW_HDFS', + 'ARROW_S3', + 'ARROW_USE_GLOG', + 'ARROW_USE_NATIVE_INT128', + 'ARROW_WITH_BROTLI', + 'ARROW_WITH_BZ2', + 'ARROW_WITH_LZ4', + 'ARROW_WITH_MUSL', + 'ARROW_WITH_OPENTELEMETRY', + 'ARROW_WITH_RE2', + 'ARROW_WITH_SNAPPY', + 'ARROW_WITH_UCX', + 'ARROW_WITH_UTF8PROC', + 'ARROW_WITH_ZLIB', + 'ARROW_WITH_ZSTD', + 'PARQUET_REQUIRE_ENCRYPTION', +] + conf_data.set(cmakedefine, false) +endforeach Review Comment: It seems that we don't need to use `foreach` here: ```meson conf_data.set('ARROW_COMPUTE', false) conf_data.set('ARROW_CSV', false) ... -- 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