WillAyd commented on code in PR #574:
URL: https://github.com/apache/arrow-nanoarrow/pull/574#discussion_r1704476574


##########
meson.build:
##########
@@ -148,50 +164,28 @@ if get_option('tests')
   arrow_dep = dependency('arrow')
   gtest_dep = dependency('gtest_main')
   gmock_dep = dependency('gmock')
-  nlohmann_json_dep = dependency('nlohmann_json')
 
-  nanoarrow_tests = {
-      'utils': {
-          'deps': [arrow_dep, gtest_dep, gmock_dep, nlohmann_json_dep],
-      },
-      'buffer': {
-          'deps': [arrow_dep, gtest_dep],
-      },
-      'array': {
-          'deps': [arrow_dep, gtest_dep, gmock_dep],
-      },
-      'schema': {
-          'deps': [arrow_dep, gtest_dep],
-      },
-      'array-stream': {
-          'deps': [arrow_dep, gtest_dep, gmock_dep],
-      },
-      'nanoarrow-hpp': {
-          'deps': [arrow_dep, gtest_dep, gmock_dep, nlohmann_json_dep],
-      },
-  }
-
-  foreach name, config : nanoarrow_tests
+  nanoarrow_tests = ['utils', 'buffer', 'array', 'schema', 'array-stream', 
'nanoarrow-hpp']
+
+  foreach name : nanoarrow_tests
     exc = executable(
         name + '-test',
         sources: 'src/nanoarrow/common/' + name.replace('-', '_') + '_test.cc',
-        link_with: nanoarrow_lib,
         include_directories: incdir,
-        dependencies: config['deps'],
+        dependencies: [nanoarrow_testing_dep, nanoarrow_dep, arrow_dep, 
gtest_dep, gmock_dep],

Review Comment:
   Don't think so - I believe the `nanoarrow_dep` it has as a dependency will 
take care of that. Using CMake as an analogy, I think:
   
   ```python
   nanoarrow_dep = declare_dependency(link_with: nanoarrow_lib, ...)
   ```
   
   is akin to using the PUBLIC keyword when setting the link libraries of a 
target
   
   ```cmake
   target_link_libraries(nanoarrow PUBLIC nanoarrow_lib)
   ```
   
   i.e. it becomes transitive for any target that references the dependency



-- 
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]

Reply via email to