Fix build

This commit is contained in:
Raúl Marín 2024-11-25 21:10:14 +01:00
parent e19ac0aa11
commit cb7d33dc6e
12 changed files with 23 additions and 6 deletions

View File

@ -5,6 +5,7 @@ set (CLICKHOUSE_EXTRACT_FROM_CONFIG_LINK
boost::program_options
clickhouse_common_config
clickhouse_common_io
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper
)

View File

@ -7,6 +7,7 @@ set (CLICKHOUSE_KEEPER_LINK
PRIVATE
clickhouse_common_config
clickhouse_common_io
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper
daemon
clickhouse-keeper-converter-lib

View File

@ -8,6 +8,7 @@ set (CLICKHOUSE_SERVER_LINK
clickhouse_aggregate_functions
clickhouse_common_config
clickhouse_common_io
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper
clickhouse_functions
clickhouse_parsers

View File

@ -415,6 +415,7 @@ dbms_target_link_libraries (
boost::filesystem
boost::program_options
clickhouse_common_config
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper
clickhouse_dictionaries_embedded
clickhouse_parsers
@ -660,6 +661,7 @@ if (ENABLE_TESTS)
clickhouse_parsers
clickhouse_storages_system
dbms
clickhouse_common_zookeeper_base
clickhouse_common_config
clickhouse_common_zookeeper
hilite_comparator)

View File

@ -11,6 +11,7 @@ set (SRCS
add_library(clickhouse_common_config ${SRCS})
target_link_libraries(clickhouse_common_config
PUBLIC
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper
common
Poco::XML

View File

@ -1,10 +1,13 @@
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
add_headers_and_sources(clickhouse_common_zookeeper .)
# Needed to build without Keeper (FreeBSD and other builds)
list(APPEND clickhouse_common_zookeeper_sources ${CMAKE_CURRENT_SOURCE_DIR}/../../../src/Coordination/KeeperFeatureFlags.cpp)
# Needs to be built differently depending on ZOOKEEPER_LOG
list(REMOVE_ITEM clickhouse_common_zookeeper_sources "ZooKeeperImpl.cpp")
add_library(clickhouse_common_zookeeper_base ${clickhouse_common_zookeeper_headers} ${clickhouse_common_zookeeper_sources})
target_link_libraries (clickhouse_common_zookeeper_base
PUBLIC
@ -18,14 +21,18 @@ add_library(clickhouse_common_zookeeper ZooKeeperImpl.cpp)
target_compile_definitions (clickhouse_common_zookeeper PRIVATE -DZOOKEEPER_LOG)
target_link_libraries (clickhouse_common_zookeeper
PUBLIC
clickhouse_common_zookeeper_base
clickhouse_common_io
clickhouse_compression
common
)
# for examples -- no logging (to avoid extra dependencies)
add_library(clickhouse_common_zookeeper_no_log ZooKeeperImpl.cpp)
target_link_libraries (clickhouse_common_zookeeper_no_log
PUBLIC
clickhouse_common_zookeeper_base
clickhouse_common_io
clickhouse_compression
common
)
if (ENABLE_EXAMPLES)
add_subdirectory(examples)

View File

@ -1,15 +1,15 @@
clickhouse_add_executable(zkutil_test_commands zkutil_test_commands.cpp)
target_link_libraries(zkutil_test_commands PRIVATE
clickhouse_common_zookeeper_no_log
clickhouse_common_zookeeper_base clickhouse_common_zookeeper_no_log
dbms)
clickhouse_add_executable(zkutil_test_commands_new_lib zkutil_test_commands_new_lib.cpp)
target_link_libraries(zkutil_test_commands_new_lib PRIVATE
clickhouse_common_zookeeper_no_log
clickhouse_common_zookeeper_base clickhouse_common_zookeeper_no_log
clickhouse_compression
dbms)
clickhouse_add_executable(zkutil_test_async zkutil_test_async.cpp)
target_link_libraries(zkutil_test_async PRIVATE
clickhouse_common_zookeeper_no_log
clickhouse_common_zookeeper_base clickhouse_common_zookeeper_no_log
dbms)

View File

@ -47,6 +47,7 @@ add_library(clickhouse_storages_system ${storages_system_sources})
target_link_libraries(clickhouse_storages_system PRIVATE
dbms
common
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper
clickhouse_parsers
Poco::JSON

View File

@ -5,4 +5,4 @@ clickhouse_add_executable (merge_selector2 merge_selector2.cpp)
target_link_libraries (merge_selector2 PRIVATE dbms)
clickhouse_add_executable (get_current_inserts_in_replicated get_current_inserts_in_replicated.cpp)
target_link_libraries (get_current_inserts_in_replicated PRIVATE dbms clickhouse_common_config clickhouse_common_zookeeper)
target_link_libraries (get_current_inserts_in_replicated PRIVATE dbms clickhouse_common_config clickhouse_common_zookeeper_base clickhouse_common_zookeeper)

View File

@ -2,6 +2,7 @@ clickhouse_add_executable(clickhouse-zookeeper-cli
zookeeper-cli.cpp
${ClickHouse_SOURCE_DIR}/src/Client/LineReader.cpp)
target_link_libraries(clickhouse-zookeeper-cli PRIVATE
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper_no_log
dbms
clickhouse_functions

View File

@ -1,5 +1,6 @@
clickhouse_add_executable (zookeeper-dump-tree main.cpp ${SRCS})
target_link_libraries(zookeeper-dump-tree PRIVATE
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper_no_log
clickhouse_common_io
dbms

View File

@ -1,5 +1,6 @@
clickhouse_add_executable (zookeeper-remove-by-list main.cpp ${SRCS})
target_link_libraries(zookeeper-remove-by-list PRIVATE
clickhouse_common_zookeeper_base
clickhouse_common_zookeeper_no_log
dbms
clickhouse_functions