diff --git a/cpp/examples/arrow/CMakeLists.txt b/cpp/examples/arrow/CMakeLists.txt index 468f59cedd491..80de0b93192e6 100644 --- a/cpp/examples/arrow/CMakeLists.txt +++ b/cpp/examples/arrow/CMakeLists.txt @@ -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) diff --git a/cpp/src/arrow/compute/row/CMakeLists.txt b/cpp/src/arrow/compute/row/CMakeLists.txt index 45fce65e57e34..11e622bcb9a12 100644 --- a/cpp/src/arrow/compute/row/CMakeLists.txt +++ b/cpp/src/arrow/compute/row/CMakeLists.txt @@ -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()