Skip to content

Commit 5641cd5

Browse files
authored
GH-45775: [C++] Use dict.get() in Meson configuration (#45776)
### Rationale for this change This change cuts down on the verbosity of the Meson configuration ### What changes are included in this PR? dict.get() with an empty list default value is used in lieu of requiring every dictionary to create keys with empty list values, where applicable ### Are these changes tested? Yes ### Are there any user-facing changes? No * GitHub Issue: #45775 Authored-by: Will Ayd <william.ayd@icloud.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent c2e9798 commit 5641cd5

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

cpp/src/arrow/meson.build

+4-24
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ arrow_components = {
4444
'array/util.cc',
4545
'array/validate.cc',
4646
],
47-
'include_dirs': [],
48-
'dependencies': [],
4947
},
5048
'arrow_compute': {
5149
'sources': [
@@ -78,8 +76,6 @@ arrow_components = {
7876
'compute/kernels/vector_selection_internal.cc',
7977
'compute/kernels/vector_selection_take_internal.cc',
8078
],
81-
'include_dirs': [],
82-
'dependencies': [],
8379
},
8480
'arrow_io': {
8581
'sources': [
@@ -149,14 +145,9 @@ arrow_components = {
149145
'util/utf8.cc',
150146
'util/value_parsing.cc',
151147
],
152-
'include_dirs': [],
153148
'dependencies': [threads_dep],
154149
},
155-
'memory_pool': {
156-
'sources': ['memory_pool.cc'],
157-
'include_dirs': [],
158-
'dependencies': [],
159-
},
150+
'memory_pool': {'sources': ['memory_pool.cc']},
160151
'vendored': {
161152
'sources': [
162153
'vendored/base64.cpp',
@@ -186,8 +177,6 @@ arrow_components = {
186177
'vendored/uriparser/UriResolve.c',
187178
'vendored/uriparser/UriShorten.c',
188179
],
189-
'include_dirs': [],
190-
'dependencies': [],
191180
},
192181
'arrow_base': {
193182
'sources': [
@@ -222,8 +211,6 @@ arrow_components = {
222211
'c/bridge.cc',
223212
'c/dlpack.cc',
224213
],
225-
'include_dirs': [],
226-
'dependencies': [],
227214
},
228215
}
229216

@@ -247,8 +234,6 @@ if needs_integration or needs_tests
247234
'integration/json_integration.cc',
248235
'integration/json_internal.cc',
249236
],
250-
'include_dirs': [],
251-
'dependencies': [],
252237
},
253238
}
254239
endif
@@ -279,11 +264,7 @@ if needs_ipc
279264
endif
280265

281266
arrow_components += {
282-
'arrow_ipc': {
283-
'sources': arrow_ipc_srcs,
284-
'include_dirs': [],
285-
'dependencies': arrow_ipc_deps,
286-
},
267+
'arrow_ipc': {'sources': arrow_ipc_srcs, 'dependencies': arrow_ipc_deps},
287268
}
288269
endif
289270

@@ -302,7 +283,6 @@ if needs_json
302283
'json/parser.cc',
303284
'json/reader.cc',
304285
],
305-
'include_dirs': [],
306286
'dependencies': [rapidjson_dep],
307287
},
308288
}
@@ -314,8 +294,8 @@ arrow_includes = [include_dir]
314294
arrow_deps = []
315295
foreach key, val : arrow_components
316296
arrow_srcs += val['sources']
317-
arrow_includes += val['include_dirs']
318-
arrow_deps += val['dependencies']
297+
arrow_includes += val.get('include_dirs', [])
298+
arrow_deps += val.get('dependencies', [])
319299
endforeach
320300

321301
arrow_lib = library(

0 commit comments

Comments
 (0)