kou commented on code in PR #47298:
URL: https://github.com/apache/arrow/pull/47298#discussion_r2265020427


##########
cpp/src/arrow/meson.build:
##########
@@ -569,20 +569,36 @@ else
     gmock_dep = disabler()
 endif
 
-arrow_test_lib = static_library(
-    'arrow_testing',
-    sources: arrow_testing_srcs,
-    dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
-)
+if needs_testing
+    arrow_testing_lib = static_library(
+        'arrow_testing',
+        sources: arrow_testing_srcs,
+        dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
+    )
+
+    arrow_testing_dep = declare_dependency(link_with: [arrow_testing_lib])
+else
+    arrow_testing_dep = disabler()
+endif
 
 if needs_tests
     arrow_test_dep = declare_dependency(
-        link_with: [arrow_test_lib],
-        dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
+        dependencies: [
+            arrow_dep,
+            arrow_testing_dep,
+            filesystem_dep,
+            gmock_dep,
+            gtest_main_dep,

Review Comment:
   Can we remove this with `arrow_testing_dep`?



##########
cpp/src/arrow/integration/meson.build:
##########
@@ -20,8 +20,13 @@ 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],
+    dependencies: [
+        arrow_dep,
+        arrow_testing_dep,
+        rapidjson_dep,
+        gflags_dep,
+        gtest_dep,

Review Comment:
   Do we need `gtest_dep` with `arrow_testing_dep`?
   `arrow_testing_dep` includes `gtest_main_dep`.



##########
cpp/src/arrow/flight/meson.build:
##########
@@ -64,6 +64,7 @@ flight_proto_files = custom_target(
     ],
 )
 
+grpc_cpp = dependency('grpc++')

Review Comment:
   It seems that this isn't used in this PR.



##########
cpp/subprojects/re2.wrap:
##########


Review Comment:
   Why do we need this in this PR?



##########
cpp/src/arrow/meson.build:
##########
@@ -569,20 +569,36 @@ else
     gmock_dep = disabler()
 endif
 
-arrow_test_lib = static_library(
-    'arrow_testing',
-    sources: arrow_testing_srcs,
-    dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
-)
+if needs_testing
+    arrow_testing_lib = static_library(
+        'arrow_testing',
+        sources: arrow_testing_srcs,
+        dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
+    )
+
+    arrow_testing_dep = declare_dependency(link_with: [arrow_testing_lib])
+else
+    arrow_testing_dep = disabler()
+endif
 
 if needs_tests
     arrow_test_dep = declare_dependency(
-        link_with: [arrow_test_lib],
-        dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_main_dep],
+        dependencies: [
+            arrow_dep,
+            arrow_testing_dep,
+            filesystem_dep,
+            gmock_dep,
+            gtest_main_dep,
+        ],
     )
     arrow_test_dep_no_main = declare_dependency(
-        link_with: [arrow_test_lib],
-        dependencies: [arrow_dep, filesystem_dep, gmock_dep, gtest_dep],
+        dependencies: [
+            arrow_dep,
+            arrow_testing_dep,
+            filesystem_dep,
+            gmock_dep,
+            gtest_dep,

Review Comment:
   Can we remove this with `arrow_testing_dep`?



##########
cpp/src/arrow/util/meson.build:
##########
@@ -236,8 +236,13 @@ endif
 exc = executable(
     'arrow-utility-test',
     sources: utility_test_srcs,
-    dependencies: [arrow_dep, filesystem_dep, gtest_dep, gmock_dep],
-    link_with: [arrow_test_lib],
+    dependencies: [
+        arrow_dep,
+        arrow_testing_dep,
+        filesystem_dep,
+        gtest_dep,
+        gmock_dep,

Review Comment:
   Can we remove them with `arrow_testing_dep`?



##########
cpp/src/arrow/meson.build:
##########
@@ -655,8 +671,12 @@ if needs_benchmarks
     )
 
     arrow_benchmark_dep = declare_dependency(
-        link_with: [arrow_test_lib],
-        dependencies: [arrow_dep, benchmark_main_dep, gtest_dep],
+        dependencies: [
+            arrow_dep,
+            arrow_testing_dep,
+            benchmark_main_dep,
+            gtest_dep,

Review Comment:
   Can we remove this with `arrow_testing_dep`?



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

Reply via email to