Skip to content
Open
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
19 changes: 18 additions & 1 deletion clickhouse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,25 @@ SET_TARGET_PROPERTIES (clickhouse-cpp-lib
LINKER_LANGUAGE CXX
VERSION ${CLICKHOUSE_CPP_VERSION}
)

# Make sure the API of absl's UInt128 is also available when using ClickHouse-cpp
# as a shared library. This currently works only for Linux and Windows
IF (BUILD_SHARED_LIBS AND NOT WITH_SYSTEM_ABSEIL)
GET_TARGET_PROPERTY(absl_lib absl::int128 ALIASED_TARGET)
SET_PROPERTY (TARGET ${absl_lib} PROPERTY POSITION_INDEPENDENT_CODE ON)
TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
$<$<PLATFORM_ID:Darwin>:-Wl,-force_load,$<TARGET_FILE:${absl_lib}>>
$<$<PLATFORM_ID:Linux>:-Wl,--whole-archive>
absl::int128
$<$<PLATFORM_ID:Linux>:-Wl,--no-whole-archive>
)
ELSE ()
TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
absl::int128
)
ENDIF ()

TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
absl::int128
cityhash::cityhash
lz4::lz4
zstd::zstd
Expand Down
Loading