Skip to content
Open
7 changes: 5 additions & 2 deletions cmake_modules/IcebergThirdpartyToolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,6 @@ function(resolve_spdlog_dependency)
list(APPEND ICEBERG_SYSTEM_DEPENDENCIES spdlog)
endif()

list(APPEND ICEBERG_SYSTEM_DEPENDENCIES Threads)

set(ICEBERG_SYSTEM_DEPENDENCIES
${ICEBERG_SYSTEM_DEPENDENCIES}
PARENT_SCOPE)
Expand Down Expand Up @@ -969,6 +967,11 @@ resolve_nanoarrow_dependency()
resolve_croaring_dependency()
resolve_utf8proc_dependency()
resolve_nlohmann_json_dependency()

# Scan scheduling needs threading primitives even when spdlog is disabled.
find_package(Threads REQUIRED)
list(APPEND ICEBERG_SYSTEM_DEPENDENCIES Threads)

if(ICEBERG_SPDLOG)
resolve_spdlog_dependency()
endif()
Expand Down
13 changes: 9 additions & 4 deletions src/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,13 @@ if(MSVC_TOOLCHAIN)
endif()

set(ICEBERG_DATA_SOURCES
data/arrow_batch_sizer.cc
data/data_writer.cc
data/delete_filter.cc
data/delete_loader.cc
data/equality_delete_writer.cc
data/file_scan_task_reader.cc
data/parallel_scan_reader.cc
data/position_delete_writer.cc
data/writer.cc)

Expand All @@ -264,18 +266,21 @@ set(ICEBERG_DATA_SHARED_BUILD_INTERFACE_LIBS)
set(ICEBERG_DATA_STATIC_INSTALL_INTERFACE_LIBS)
set(ICEBERG_DATA_SHARED_INSTALL_INTERFACE_LIBS)

# Parallel scans synchronize callbacks dispatched by the caller's executor.
list(APPEND ICEBERG_DATA_STATIC_BUILD_INTERFACE_LIBS
"$<IF:$<TARGET_EXISTS:iceberg_static>,iceberg_static,iceberg_shared>")
"$<IF:$<TARGET_EXISTS:iceberg_static>,iceberg_static,iceberg_shared>"
Threads::Threads)
list(APPEND ICEBERG_DATA_SHARED_BUILD_INTERFACE_LIBS
"$<IF:$<TARGET_EXISTS:iceberg_shared>,iceberg_shared,iceberg_static>")
"$<IF:$<TARGET_EXISTS:iceberg_shared>,iceberg_shared,iceberg_static>"
Threads::Threads)
list(APPEND
ICEBERG_DATA_STATIC_INSTALL_INTERFACE_LIBS
"$<IF:$<TARGET_EXISTS:iceberg::iceberg_static>,iceberg::iceberg_static,iceberg::iceberg_shared>"
)
Threads::Threads)
list(APPEND
ICEBERG_DATA_SHARED_INSTALL_INTERFACE_LIBS
"$<IF:$<TARGET_EXISTS:iceberg::iceberg_shared>,iceberg::iceberg_shared,iceberg::iceberg_static>"
)
Threads::Threads)

add_iceberg_lib(iceberg_data
SOURCES
Expand Down
8 changes: 8 additions & 0 deletions src/iceberg/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,11 @@ endfunction()

add_iceberg_benchmark(benchmark_smoke)
add_iceberg_benchmark(metrics_evaluator_benchmark)

# Reads real Parquet tables, so it needs the bundle.
if(ICEBERG_BUILD_BUNDLE)
add_executable(parallel_scan_benchmark parallel_scan_benchmark.cc)
target_link_libraries(parallel_scan_benchmark
PRIVATE "$<IF:$<TARGET_EXISTS:iceberg_bundle_static>,iceberg_bundle_static,iceberg_bundle_shared>"
)
endif()
Loading