Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions src/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ set(ICEBERG_SOURCES
util/property_util.cc
util/snapshot_util.cc
util/string_util.cc
util/struct_like_set.cc
util/temporal_util.cc
util/timepoint.cc
util/transform_util.cc
Expand Down
25 changes: 24 additions & 1 deletion src/iceberg/iceberg_export.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,31 @@
# else
# define ICEBERG_EXPORT __declspec(dllimport)
# endif
#else // Not Windows

# define ICEBERG_TEMPLATE_EXPORT ICEBERG_EXPORT

// For template class declarations. Empty on MSVC: dllexport on a class template
// declaration combined with extern template triggers C4910.
# if defined(_MSC_VER)
# define ICEBERG_TEMPLATE_CLASS_EXPORT
# else
# define ICEBERG_TEMPLATE_CLASS_EXPORT ICEBERG_EXPORT
# endif

// For extern template declarations. Empty when building the DLL on MSVC:
// `extern` + `dllexport` is contradictory and triggers C4910.
# if defined(_MSC_VER) && defined(ICEBERG_EXPORTING) && !defined(ICEBERG_STATIC)
# define ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT
# else
# define ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT ICEBERG_TEMPLATE_EXPORT
# endif

#else // Non-Windows
# ifndef ICEBERG_EXPORT
# define ICEBERG_EXPORT __attribute__((visibility("default")))
# endif

# define ICEBERG_TEMPLATE_EXPORT
# define ICEBERG_TEMPLATE_CLASS_EXPORT ICEBERG_EXPORT
# define ICEBERG_EXTERN_TEMPLATE_CLASS_EXPORT ICEBERG_TEMPLATE_EXPORT
#endif
1 change: 1 addition & 0 deletions src/iceberg/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ iceberg_sources = files(
'util/property_util.cc',
'util/snapshot_util.cc',
'util/string_util.cc',
'util/struct_like_set.cc',
'util/temporal_util.cc',
'util/timepoint.cc',
'util/transform_util.cc',
Expand Down
1 change: 1 addition & 0 deletions src/iceberg/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ add_iceberg_test(util_test
formatter_test.cc
location_util_test.cc
string_util_test.cc
struct_like_set_test.cc
transform_util_test.cc
truncate_util_test.cc
url_encoder_test.cc
Expand Down
1 change: 1 addition & 0 deletions src/iceberg/test/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ iceberg_tests = {
'formatter_test.cc',
'location_util_test.cc',
'string_util_test.cc',
'struct_like_set_test.cc',
'transform_util_test.cc',
'truncate_util_test.cc',
'url_encoder_test.cc',
Expand Down
Loading
Loading