Skip to content

Commit

Permalink
Only link arrow_compute to benchmark if we are building benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
raulcd committed Feb 25, 2025
1 parent 1864b2e commit 12c3d15
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cpp/examples/arrow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ endif()

if(ARROW_COMPUTE AND ARROW_CSV)
if(ARROW_BUILD_SHARED)
set(COMPUTE_KERNELES_LINK_LIBS arrow_compute_shared)
set(COMPUTE_KERNELS_LINK_LIBS arrow_compute_shared)
else()
set(COMPUTE_KERNELES_LINK_LIBS arrow_compute_static)
set(COMPUTE_KERNELS_LINK_LIBS arrow_compute_static)
endif()
add_arrow_example(compute_and_write_csv_example EXTRA_LINK_LIBS
${COMPUTE_KERNELES_LINK_LIBS})
${COMPUTE_KERNELS_LINK_LIBS})
endif()

if(ARROW_FLIGHT)
Expand Down
14 changes: 9 additions & 5 deletions cpp/src/arrow/compute/row/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,13 @@

arrow_install_all_headers("arrow/compute/row")

add_arrow_benchmark(grouper_benchmark PREFIX "arrow-compute")
if(ARROW_BUILD_STATIC)
target_link_libraries(arrow-compute-grouper-benchmark PUBLIC arrow_compute_static)
else()
target_link_libraries(arrow-compute-grouper-benchmark PUBLIC arrow_compute_shared)
if(ARROW_BUILD_BENCHMARKS)
add_arrow_benchmark(grouper_benchmark PREFIX "arrow-compute")
if(ARROW_COMPUTE)
if(ARROW_BUILD_STATIC)
target_link_libraries(arrow-compute-grouper-benchmark PUBLIC arrow_compute_static)
else()
target_link_libraries(arrow-compute-grouper-benchmark PUBLIC arrow_compute_shared)
endif()
endif()
endif()

0 comments on commit 12c3d15

Please sign in to comment.