Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 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,12 @@ resolve_nanoarrow_dependency()
resolve_croaring_dependency()
resolve_utf8proc_dependency()
resolve_nlohmann_json_dependency()

# iceberg_data starts worker threads for parallel scans, so Threads is required
# 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)

# The parallel scan reader starts worker threads.
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
1 change: 1 addition & 0 deletions src/iceberg/cpp20_compatibility_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "iceberg/data/delete_loader.h"
#include "iceberg/data/equality_delete_writer.h"
#include "iceberg/data/file_scan_task_reader.h"
#include "iceberg/data/parallel_scan_reader.h"
#include "iceberg/data/position_delete_writer.h"
#include "iceberg/data/writer.h"
#include "iceberg/data_table_scan.h"
Expand Down
Loading
Loading