WillAyd commented on code in PR #483:
URL: https://github.com/apache/arrow-nanoarrow/pull/483#discussion_r1635150742
##########
src/nanoarrow/meson.build:
##########
@@ -147,4 +166,38 @@ if get_option('tests')
include_directories: incdir)
test('c_data_integration test', c_data_integration_test)
+ if get_option('ipc')
+ zlib_dep = dependency('zlib')
+ ipc_test_files = {
+ 'nanoarrow-ipc-decoder': {
+ 'deps': [nanoarrow_dep, flatcc_dep, arrow_dep, gtest_dep],
+ },
+ 'nanoarrow-ipc-reader': {
+ 'deps': [nanoarrow_dep, flatcc_dep, arrow_dep, gtest_dep],
+ },
+ 'nanoarrow-ipc-files': {
+ 'deps': [
+ nanoarrow_dep,
+ flatcc_dep,
+ zlib_dep,
+ arrow_dep,
+ gtest_dep,
+ nlohmann_json_dep
+ ],
+ },
+ 'nanoarrow-ipc-hpp': {
+ 'deps': [nanoarrow_dep, flatcc_dep, gtest_dep],
+ },
+ }
+
+ foreach name, config : ipc_test_files
+ exc = executable(
+ name + '-test',
+ name.replace('-', '_') + '_test.cc',
+ link_with: nanoarrow_ipc_lib,
+ dependencies: config['deps']
Review Comment:
I think when coming from CMake it is helpful to understand that the word
"dependency" means something else in Meson. In CMake, dependency refers to
"something that needs to be built before this target can be". In Meson, a
dependency helps you transitively use include directories / link targets. You
declare this via the `declare_dependency` function:
```python
base_dep = declare_dependency(
include_directories: ['foo_dir'],
link_with: [threads_lib],
)
```
So when you end up using that dependency on another target, it will
transitively carry over the include / link flags for you, i.e.
```python
child_lib = library('child', sources: ['child.cc'], dependencies: [base_dep])
```
expands into
```python
child_lib = library('child',
sources: ['child.cc'],
include_directories: ['foo_dir'],
link_with: [threads_lib],
)
```
(at least as far as I understand things)
--
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]