diff --git a/velox/benchmarks/basic/CMakeLists.txt b/velox/benchmarks/basic/CMakeLists.txt index 22614f0bd2a..3cddd31721c 100644 --- a/velox/benchmarks/basic/CMakeLists.txt +++ b/velox/benchmarks/basic/CMakeLists.txt @@ -126,11 +126,13 @@ target_link_libraries( velox_row_fast ) -add_executable(velox_date_extract_benchmark DateExtractBenchmark.cpp) -target_link_libraries( - velox_date_extract_benchmark - ${velox_benchmark_deps} - velox_vector_test_lib - velox_functions_prestosql - velox_functions_spark -) +if(${VELOX_ENABLE_PRESTO_FUNCTIONS} AND ${VELOX_ENABLE_SPARK_FUNCTIONS}) + add_executable(velox_date_extract_benchmark DateExtractBenchmark.cpp) + target_link_libraries( + velox_date_extract_benchmark + ${velox_benchmark_deps} + velox_vector_test_lib + velox_functions_prestosql + velox_functions_spark + ) +endif()