From 323fb54a8e0bee88fabe2ab3cb872be4e7a40978 Mon Sep 17 00:00:00 2001 From: kssenii Date: Fri, 12 Mar 2021 21:12:34 +0000 Subject: [PATCH] Fix split build finally --- base/CMakeLists.txt | 1 + base/bridge/CMakeLists.txt | 7 +++++++ {src/Common/Bridge => base/bridge}/IBridge.cpp | 0 {src/Common/Bridge => base/bridge}/IBridge.h | 0 programs/library-bridge/CMakeLists.txt | 2 +- programs/library-bridge/LibraryBridge.h | 2 +- src/{Common => Bridge}/IBridgeHelper.cpp | 0 src/{Common => Bridge}/IBridgeHelper.h | 0 src/{Common => Bridge}/LibraryBridgeHelper.cpp | 0 src/{Common => Bridge}/LibraryBridgeHelper.h | 2 +- src/{Common => Bridge}/XDBCBridgeHelper.h | 2 +- src/CMakeLists.txt | 2 +- src/Common/Bridge/CMakeLists.txt | 8 -------- src/Common/ya.make | 3 --- src/Dictionaries/LibraryDictionarySource.h | 2 +- src/Dictionaries/XDBCDictionarySource.h | 2 +- src/Storages/StorageXDBC.h | 2 +- src/TableFunctions/ITableFunctionXDBC.h | 2 +- 18 files changed, 17 insertions(+), 20 deletions(-) create mode 100644 base/bridge/CMakeLists.txt rename {src/Common/Bridge => base/bridge}/IBridge.cpp (100%) rename {src/Common/Bridge => base/bridge}/IBridge.h (100%) rename src/{Common => Bridge}/IBridgeHelper.cpp (100%) rename src/{Common => Bridge}/IBridgeHelper.h (100%) rename src/{Common => Bridge}/LibraryBridgeHelper.cpp (100%) rename src/{Common => Bridge}/LibraryBridgeHelper.h (98%) rename src/{Common => Bridge}/XDBCBridgeHelper.h (99%) delete mode 100644 src/Common/Bridge/CMakeLists.txt diff --git a/base/CMakeLists.txt b/base/CMakeLists.txt index 46bd57eda12..023dcaaccae 100644 --- a/base/CMakeLists.txt +++ b/base/CMakeLists.txt @@ -8,6 +8,7 @@ add_subdirectory (loggers) add_subdirectory (pcg-random) add_subdirectory (widechar_width) add_subdirectory (readpassphrase) +add_subdirectory (bridge) if (USE_MYSQL) add_subdirectory (mysqlxx) diff --git a/base/bridge/CMakeLists.txt b/base/bridge/CMakeLists.txt new file mode 100644 index 00000000000..5af01eff628 --- /dev/null +++ b/base/bridge/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library (bridge + IBridge.cpp +) + +target_include_directories (daemon PUBLIC ..) +target_link_libraries (bridge PRIVATE daemon dbms) + diff --git a/src/Common/Bridge/IBridge.cpp b/base/bridge/IBridge.cpp similarity index 100% rename from src/Common/Bridge/IBridge.cpp rename to base/bridge/IBridge.cpp diff --git a/src/Common/Bridge/IBridge.h b/base/bridge/IBridge.h similarity index 100% rename from src/Common/Bridge/IBridge.h rename to base/bridge/IBridge.h diff --git a/programs/library-bridge/CMakeLists.txt b/programs/library-bridge/CMakeLists.txt index d558364d7d4..a9aa5b4f366 100644 --- a/programs/library-bridge/CMakeLists.txt +++ b/programs/library-bridge/CMakeLists.txt @@ -18,7 +18,7 @@ target_link_libraries(clickhouse-library-bridge PRIVATE daemon dbms clickhouse_parsers - clickhouse_common_bridge + bridge ) set_target_properties(clickhouse-library-bridge PROPERTIES RUNTIME_OUTPUT_DIRECTORY ..) diff --git a/programs/library-bridge/LibraryBridge.h b/programs/library-bridge/LibraryBridge.h index b5d5360e3df..168df76b9e2 100644 --- a/programs/library-bridge/LibraryBridge.h +++ b/programs/library-bridge/LibraryBridge.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include "HandlerFactory.h" diff --git a/src/Common/IBridgeHelper.cpp b/src/Bridge/IBridgeHelper.cpp similarity index 100% rename from src/Common/IBridgeHelper.cpp rename to src/Bridge/IBridgeHelper.cpp diff --git a/src/Common/IBridgeHelper.h b/src/Bridge/IBridgeHelper.h similarity index 100% rename from src/Common/IBridgeHelper.h rename to src/Bridge/IBridgeHelper.h diff --git a/src/Common/LibraryBridgeHelper.cpp b/src/Bridge/LibraryBridgeHelper.cpp similarity index 100% rename from src/Common/LibraryBridgeHelper.cpp rename to src/Bridge/LibraryBridgeHelper.cpp diff --git a/src/Common/LibraryBridgeHelper.h b/src/Bridge/LibraryBridgeHelper.h similarity index 98% rename from src/Common/LibraryBridgeHelper.h rename to src/Bridge/LibraryBridgeHelper.h index 0a170f6ade9..ac9205af454 100644 --- a/src/Common/LibraryBridgeHelper.h +++ b/src/Bridge/LibraryBridgeHelper.h @@ -5,7 +5,7 @@ #include #include #include -#include +#include namespace DB diff --git a/src/Common/XDBCBridgeHelper.h b/src/Bridge/XDBCBridgeHelper.h similarity index 99% rename from src/Common/XDBCBridgeHelper.h rename to src/Bridge/XDBCBridgeHelper.h index 5adb6094724..81521b440da 100644 --- a/src/Common/XDBCBridgeHelper.h +++ b/src/Bridge/XDBCBridgeHelper.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #if !defined(ARCADIA_BUILD) # include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4720bbc1a6d..038eb1b4f89 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -149,7 +149,6 @@ endif() add_subdirectory(Common/ZooKeeper) add_subdirectory(Common/Config) -add_subdirectory(Common/Bridge) set (all_modules) macro(add_object_library name common_path) @@ -181,6 +180,7 @@ add_object_library(clickhouse_storages_distributed Storages/Distributed) add_object_library(clickhouse_storages_mergetree Storages/MergeTree) add_object_library(clickhouse_storages_liveview Storages/LiveView) add_object_library(clickhouse_client Client) +add_object_library(clickhouse_bridge Bridge) add_object_library(clickhouse_server Server) add_object_library(clickhouse_server_http Server/HTTP) add_object_library(clickhouse_formats Formats) diff --git a/src/Common/Bridge/CMakeLists.txt b/src/Common/Bridge/CMakeLists.txt deleted file mode 100644 index 60c26514adb..00000000000 --- a/src/Common/Bridge/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -include(${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake) - -add_headers_and_sources(clickhouse_common_bridge .) - -add_library(clickhouse_common_bridge ${clickhouse_common_bridge_headers} ${clickhouse_common_bridge_sources}) - -target_link_libraries (clickhouse_common_bridge PUBLIC clickhouse_common_io common PRIVATE daemon Poco::Util) - diff --git a/src/Common/ya.make b/src/Common/ya.make index e27de051688..debad6c5de2 100644 --- a/src/Common/ya.make +++ b/src/Common/ya.make @@ -28,7 +28,6 @@ SRCS( ActionLock.cpp AlignedBuffer.cpp Allocator.cpp - Bridge/IBridge.cpp ClickHouseRevision.cpp Config/AbstractConfigurationComparison.cpp Config/ConfigProcessor.cpp @@ -46,10 +45,8 @@ SRCS( ExternalLoaderStatus.cpp FieldVisitors.cpp FileChecker.cpp - IBridgeHelper.cpp IPv6ToBinary.cpp IntervalKind.cpp - LibraryBridgeHelper.cpp Macros.cpp MemoryStatisticsOS.cpp MemoryTracker.cpp diff --git a/src/Dictionaries/LibraryDictionarySource.h b/src/Dictionaries/LibraryDictionarySource.h index 68fdcfd2475..88eeb73fa40 100644 --- a/src/Dictionaries/LibraryDictionarySource.h +++ b/src/Dictionaries/LibraryDictionarySource.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include #include #include #include "DictionaryStructure.h" diff --git a/src/Dictionaries/XDBCDictionarySource.h b/src/Dictionaries/XDBCDictionarySource.h index 87bc42c76ab..b595341ff7a 100644 --- a/src/Dictionaries/XDBCDictionarySource.h +++ b/src/Dictionaries/XDBCDictionarySource.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include "DictionaryStructure.h" #include "ExternalQueryBuilder.h" #include "IDictionarySource.h" diff --git a/src/Storages/StorageXDBC.h b/src/Storages/StorageXDBC.h index 8524a03503a..1708bfa561d 100644 --- a/src/Storages/StorageXDBC.h +++ b/src/Storages/StorageXDBC.h @@ -1,7 +1,7 @@ #pragma once #include -#include +#include namespace DB diff --git a/src/TableFunctions/ITableFunctionXDBC.h b/src/TableFunctions/ITableFunctionXDBC.h index fb0a0fd1185..4bee9512086 100644 --- a/src/TableFunctions/ITableFunctionXDBC.h +++ b/src/TableFunctions/ITableFunctionXDBC.h @@ -3,7 +3,7 @@ #include #include #include -#include +#include #if !defined(ARCADIA_BUILD) # include