Skip to content
Merged
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
4 changes: 2 additions & 2 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ find_package(iceberg CONFIG REQUIRED)

add_executable(demo_example demo_example.cc)

target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_static
iceberg::iceberg_rest_static)
target_link_libraries(demo_example PRIVATE iceberg::iceberg_bundle_shared
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example now unconditionally links iceberg::iceberg_bundle_shared and iceberg::iceberg_rest_shared, but the project default is ICEBERG_BUILD_SHARED=OFF and ICEBERG_BUILD_STATIC=ON. A default static-only install exports only the static targets, so configuring the example against that package fails at CMake generate with missing iceberg::iceberg_bundle_shared.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hadn't considered that. Should we set ICEBERG_BUILD_SHARED=ON and ICEBERG_BUILD_STATIC=OFF, or set both ON?

iceberg::iceberg_rest_shared)
6 changes: 3 additions & 3 deletions src/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,13 @@ set(ICEBERG_SHARED_INSTALL_INTERFACE_LIBS)

list(APPEND
ICEBERG_STATIC_BUILD_INTERFACE_LIBS
nanoarrow::nanoarrow_static
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,nanoarrow::nanoarrow_static,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_static>,nanoarrow::nanoarrow_static,nanoarrow::nanoarrow_shared>>"
nlohmann_json::nlohmann_json
roaring::roaring
ZLIB::ZLIB)
list(APPEND
ICEBERG_SHARED_BUILD_INTERFACE_LIBS
nanoarrow::nanoarrow_shared
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,nanoarrow::nanoarrow_static,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_shared>,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>"
nlohmann_json::nlohmann_json
roaring::roaring
ZLIB::ZLIB)
Expand All @@ -149,7 +149,7 @@ list(APPEND
"$<IF:$<BOOL:${CROARING_VENDORED}>,iceberg::roaring,roaring::roaring>")
list(APPEND
ICEBERG_SHARED_INSTALL_INTERFACE_LIBS
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,iceberg::nanoarrow_shared,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_shared>,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>"
"$<IF:$<BOOL:${NANOARROW_VENDORED}>,iceberg::nanoarrow_static,$<IF:$<TARGET_EXISTS:nanoarrow::nanoarrow_shared>,nanoarrow::nanoarrow_shared,nanoarrow::nanoarrow_static>>"
"$<IF:$<BOOL:${NLOHMANN_JSON_VENDORED}>,iceberg::nlohmann_json,$<IF:$<TARGET_EXISTS:nlohmann_json::nlohmann_json>,nlohmann_json::nlohmann_json,nlohmann_json::nlohmann_json>>"
"$<IF:$<BOOL:${CROARING_VENDORED}>,iceberg::roaring,roaring::roaring>")

Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/iceberg_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,5 @@

# define ICEBERG_TEMPLATE_EXPORT
# define ICEBERG_TEMPLATE_CLASS_EXPORT ICEBERG_EXPORT
# define ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT ICEBERG_TEMPLATE_EXPORT
# define ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT ICEBERG_TEMPLATE_CLASS_EXPORT
#endif
6 changes: 3 additions & 3 deletions src/iceberg/table_scan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -535,9 +535,9 @@ Result<std::unique_ptr<ScanType>> TableScanBuilder<ScanType>::Build() {
}

// Explicit template instantiations
template class TableScanBuilder<DataTableScan>;
template class TableScanBuilder<IncrementalAppendScan>;
template class TableScanBuilder<IncrementalChangelogScan>;
template class ICEBERG_TEMPLATE_EXPORT TableScanBuilder<DataTableScan>;
template class ICEBERG_TEMPLATE_EXPORT TableScanBuilder<IncrementalAppendScan>;
template class ICEBERG_TEMPLATE_EXPORT TableScanBuilder<IncrementalChangelogScan>;

TableScan::TableScan(std::shared_ptr<TableMetadata> metadata,
std::shared_ptr<Schema> schema, std::shared_ptr<FileIO> file_io,
Expand Down
10 changes: 9 additions & 1 deletion src/iceberg/table_scan.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include <vector>

#include "iceberg/arrow_c_data.h"
#include "iceberg/iceberg_export.h"
#include "iceberg/result.h"
#include "iceberg/table_metadata.h"
#include "iceberg/type_fwd.h"
Expand Down Expand Up @@ -252,7 +253,7 @@ concept IsIncrementalScan = std::is_base_of_v<IncrementalScan<FileScanTask>, T>

/// \brief Builder class for creating TableScan instances.
template <typename ScanType = DataTableScan>
class ICEBERG_EXPORT TableScanBuilder : public ErrorCollector {
class ICEBERG_TEMPLATE_CLASS_EXPORT TableScanBuilder : public ErrorCollector {
public:
/// \brief Constructs a TableScanBuilder for the given table.
/// \param metadata Current table metadata.
Expand Down Expand Up @@ -524,4 +525,11 @@ class ICEBERG_EXPORT IncrementalChangelogScan
using IncrementalScan::IncrementalScan;
};

extern template class ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT
TableScanBuilder<DataTableScan>;
extern template class ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT
TableScanBuilder<IncrementalAppendScan>;
extern template class ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT
TableScanBuilder<IncrementalChangelogScan>;

} // namespace iceberg
Loading