File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -109,8 +109,25 @@ SET_TARGET_PROPERTIES (clickhouse-cpp-lib
109109 LINKER_LANGUAGE CXX
110110 VERSION ${CLICKHOUSE_CPP_VERSION}
111111)
112+
113+ # Make sure the API of absl's UInt128 is also available when using ClickHouse-cpp
114+ # as a shared library. This currently works only for Linux and Windows
115+ IF (BUILD_SHARED_LIBS AND NOT WITH_SYSTEM_ABSEIL)
116+ GET_TARGET_PROPERTY (absl_lib absl::int128 ALIASED_TARGET)
117+ SET_PROPERTY (TARGET ${absl_lib} PROPERTY POSITION_INDEPENDENT_CODE ON )
118+ TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
119+ $<$<PLATFORM_ID:Darwin>:-Wl,-force_load,$<TARGET_FILE:${absl_lib} >>
120+ $<$<PLATFORM_ID:Linux>:-Wl,--whole-archive>
121+ absl::int128
122+ $<$<PLATFORM_ID:Linux>:-Wl,--no -whole-archive>
123+ )
124+ ELSE ()
125+ TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
126+ absl::int128
127+ )
128+ ENDIF ()
129+
112130TARGET_LINK_LIBRARIES (clickhouse-cpp-lib
113- absl::int128
114131 cityhash::cityhash
115132 lz4::lz4
116133 zstd::zstd
You can’t perform that action at this time.
0 commit comments