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


##########
cpp/src/arrow/acero/CMakeLists.txt:
##########
@@ -154,41 +153,91 @@ function(add_arrow_acero_test REL_TEST_NAME)
 
   add_arrow_test(${REL_TEST_NAME}
                  EXTRA_LINK_LIBS
-                 ${ARROW_ACERO_TEST_LINK_LIBS}
+                 ${EXTRA_LINK_LIBS}
                  PREFIX
                  ${PREFIX}
                  LABELS
                  ${LABELS}
                  ${ARG_UNPARSED_ARGUMENTS})
 endfunction()
 
+if(ARROW_TESTING)
+  add_library(arrow_acero_test_nodes OBJECT test_nodes.cc)
+  target_link_libraries(arrow_acero_test_nodes PRIVATE 
${ARROW_ACERO_TEST_LINK_LIBS})
+  if(ARROW_WITH_OPENTELEMETRY)
+    target_link_libraries(arrow_acero_test_nodes PRIVATE 
${ARROW_OPENTELEMETRY_LIBS})
+  endif()
+endif()
 add_arrow_acero_test(plan_test
                      SOURCES
                      plan_test.cc
                      test_nodes_test.cc
-                     test_nodes.cc)
-add_arrow_acero_test(source_node_test SOURCES source_node_test.cc 
test_nodes.cc)
-add_arrow_acero_test(fetch_node_test SOURCES fetch_node_test.cc test_nodes.cc)
-add_arrow_acero_test(order_by_node_test SOURCES order_by_node_test.cc 
test_nodes.cc)
-add_arrow_acero_test(hash_join_node_test SOURCES hash_join_node_test.cc
-                     bloom_filter_test.cc)
-add_arrow_acero_test(pivot_longer_node_test SOURCES pivot_longer_node_test.cc
-                     test_nodes.cc)
+                     EXTRA_LINK_LIBS
+                     ${ARROW_ACERO_TEST_LINK_LIBS}

Review Comment:
   Done.



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