mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Reorganize includes. part 1 (#921)
* Make libunwind optional. Allow use custom libcctz * fix * Fix * fix * Update BaseDaemon.cpp * Update CMakeLists.txt * Reorganize includes. part 1 * Update dbms_include.cmake * Reorganize includes. part 2 * Reorganize includes. part 3 * dbms/src/Common/ThreadPool -> libs/libcommon * Reorganize includes. part 4 * Fix print_include_directories * Update thread_creation_latency.cpp * Update StringRef.h
This commit is contained in:
parent
2d359fee54
commit
4db8d09de9
@ -183,6 +183,7 @@ include (libs/libcommon/cmake/find_jemalloc.cmake)
|
||||
include (libs/libcommon/cmake/find_cctz.cmake)
|
||||
include (libs/libmysqlxx/cmake/find_mysqlclient.cmake)
|
||||
include (libs/libdaemon/cmake/find_unwind.cmake)
|
||||
include (cmake/lib_name.cmake)
|
||||
|
||||
|
||||
set (FULL_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}")
|
||||
|
@ -1,14 +0,0 @@
|
||||
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/dbms/src)
|
||||
# for generated config_version.h and config.h:
|
||||
include_directories (${ClickHouse_BINARY_DIR}/dbms/src)
|
||||
|
||||
# TODO:
|
||||
# move code with incldes from .h to .cpp and clean this list:
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/libs/libcommon/include)
|
||||
# for generated config_common.h:
|
||||
include_directories (${ClickHouse_BINARY_DIR}/libs/libcommon/include)
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/libs/libpocoext/include)
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/libs/libzkutil/include)
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/libs/libmysqlxx/include)
|
||||
include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libcityhash/include)
|
10
cmake/lib_name.cmake
Normal file
10
cmake/lib_name.cmake
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
set(CITYHASH_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libcityhash/include)
|
||||
set(CPUID_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libcpuid/include)
|
||||
set(DIVIDE_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libdivide)
|
||||
set(BTRIE_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libbtrie/include)
|
||||
set(CITYHASH_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libcityhash/include)
|
||||
set(MYSQLXX_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/libs/libmysqlxx/include)
|
||||
set(POCOEXT_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/libs/libpocoext/include)
|
||||
set(COMMON_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/libs/libcommon/include ${ClickHouse_BINARY_DIR}/libs/libcommon/include)
|
||||
set(DBMS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/dbms/src ${ClickHouse_BINARY_DIR}/dbms/src)
|
@ -1,4 +1,5 @@
|
||||
get_property (dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/dbms PROPERTY INCLUDE_DIRECTORIES)
|
||||
get_property (dirs TARGET dbms PROPERTY INCLUDE_DIRECTORIES)
|
||||
list(REMOVE_DUPLICATES dirs)
|
||||
file (WRITE ${CMAKE_CURRENT_BINARY_DIR}/include_directories.txt "")
|
||||
foreach (dir ${dirs})
|
||||
string (REPLACE "${ClickHouse_SOURCE_DIR}" "." dir "${dir}")
|
||||
|
@ -22,7 +22,7 @@ PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:$PATH"
|
||||
|
||||
# Опция -mcx16 для того, чтобы выбиралось больше заголовочных файлов (с запасом).
|
||||
|
||||
for src_file in $($CLANG -M -xc++ -std=gnu++1y -Wall -Werror -msse4 -mcx16 -mpopcnt -O3 -g -fPIC \
|
||||
for src_file in $($CLANG -M -xc++ -std=gnu++1z -Wall -Werror -msse4 -mcx16 -mpopcnt -O3 -g -fPIC \
|
||||
$(cat "$SOURCE_PATH/build/include_directories.txt") \
|
||||
"$SOURCE_PATH/dbms/src/Interpreters/SpecializedAggregator.h" |
|
||||
tr -d '\\' |
|
||||
|
@ -14,16 +14,7 @@ get_property (BUILD_INCLUDE_DIRECTORIES DIRECTORY ${ClickHouse_SOURCE_DIR} PROPE
|
||||
string (TIMESTAMP BUILD_DATE "%Y-%m-%d" UTC)
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/src/Common/config_build.cpp.in ${CONFIG_BUILD})
|
||||
|
||||
|
||||
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_include.cmake)
|
||||
|
||||
include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libdivide)
|
||||
include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libcpuid/include)
|
||||
include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libfarmhash)
|
||||
include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libmetrohash/src)
|
||||
include_directories (BEFORE ${ClickHouse_SOURCE_DIR}/contrib/libbtrie/include)
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/libs/libdaemon/include)
|
||||
include_directories (${ClickHouse_BINARY_DIR}/dbms/src)
|
||||
include_directories (${DBMS_INCLUDE_DIR})
|
||||
|
||||
if (NOT NO_WERROR)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
@ -211,9 +202,14 @@ target_link_libraries (dbms
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
|
||||
target_include_directories (dbms
|
||||
INTERFACE include
|
||||
)
|
||||
target_include_directories (dbms BEFORE PRIVATE ${CPUID_INCLUDE_DIR})
|
||||
target_include_directories (dbms BEFORE PUBLIC ${DIVIDE_INCLUDE_DIR})
|
||||
target_include_directories (dbms BEFORE PRIVATE ${BTRIE_INCLUDE_DIR})
|
||||
target_include_directories (dbms BEFORE PRIVATE ${CITYHASH_INCLUDE_DIR})
|
||||
target_include_directories (dbms PUBLIC ${MYSQLXX_INCLUDE_DIR})
|
||||
target_include_directories (dbms PRIVATE ${POCOEXT_INCLUDE_DIR})
|
||||
target_include_directories (dbms PRIVATE ${COMMON_INCLUDE_DIR})
|
||||
target_include_directories (dbms PUBLIC ${DBMS_INCLUDE_DIR})
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory (tests)
|
||||
|
@ -26,3 +26,5 @@ list(REMOVE_ITEM clickhouse_aggregate_functions_headers
|
||||
|
||||
add_library(clickhouse_aggregate_functions ${clickhouse_aggregate_functions_sources})
|
||||
target_link_libraries(clickhouse_aggregate_functions dbms)
|
||||
target_include_directories (clickhouse_aggregate_functions BEFORE PUBLIC ${CITYHASH_INCLUDE_DIR})
|
||||
target_include_directories (clickhouse_aggregate_functions PRIVATE ${COMMON_INCLUDE_DIR})
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <Columns/IColumn.h>
|
||||
#include <Columns/ColumnVector.h>
|
||||
|
||||
#include <Core/Defines.h>
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
#include <Core/Field.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
|
||||
|
||||
class SipHash;
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <ext/size.h>
|
||||
#include <Common/Arena.h>
|
||||
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Core/Field.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <IO/ReadBufferFromFileDescriptor.h>
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <IO/CompressedReadBuffer.h>
|
||||
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
|
||||
using Key = UInt64;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <IO/CompressedReadBuffer.h>
|
||||
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
|
||||
using Key = UInt64;
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <string>
|
||||
#include <map>
|
||||
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/SpaceSaving.h>
|
||||
|
||||
int main(int argc, char ** argv)
|
||||
|
@ -3,11 +3,9 @@
|
||||
|
||||
#include <IO/ReadHelpers.h>
|
||||
|
||||
//#include <Common/ThreadPool.h>
|
||||
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
|
||||
int x = 0;
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
/** Reproduces bug in ThreadPool.
|
||||
* It get stuck if we call 'wait' many times from many other threads simultaneously.
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <Common/Stopwatch.h>
|
||||
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/Arena.h>
|
||||
|
||||
#include <IO/ReadBufferFromFileDescriptor.h>
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <IO/WriteBufferFromFileDescriptor.h>
|
||||
#include <IO/WriteBufferFromString.h>
|
||||
#include <IO/Operators.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
|
||||
|
||||
/** Calculates StringRefHash from stdin. For debugging.
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include <DataStreams/IProfilingBlockInputStream.h>
|
||||
#include <Common/setThreadName.h>
|
||||
#include <Common/CurrentMetrics.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <Common/MemoryTracker.h>
|
||||
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <Interpreters/Aggregator.h>
|
||||
#include <DataStreams/IProfilingBlockInputStream.h>
|
||||
#include <Common/ConcurrentBoundedQueue.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <condition_variable>
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <iomanip>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
#include <IO/WriteBufferFromFileDescriptor.h>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <Databases/IDatabase.h>
|
||||
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <Common/escapeForFileName.h>
|
||||
#include <Common/StringUtils.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <Parsers/ASTCreateQuery.h>
|
||||
#include <Parsers/parseQuery.h>
|
||||
#include <Parsers/ParserCreateQuery.h>
|
||||
|
@ -7,7 +7,7 @@
|
||||
#include <Common/SmallObjectPool.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Columns/ColumnString.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <ext/bit_cast.h>
|
||||
#include <Poco/RWLock.h>
|
||||
#include <atomic>
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <Dictionaries/IDictionary.h>
|
||||
#include <Dictionaries/IDictionarySource.h>
|
||||
#include <Dictionaries/DictionaryStructure.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Columns/ColumnString.h>
|
||||
#include <Common/Arena.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <vector>
|
||||
#include <Poco/Exception.h>
|
||||
#include <common/Types.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
|
||||
|
||||
/** A class that allows you to recognize by region id its text name in one of the supported languages: ru, en, ua, by, kz, tr.
|
||||
|
@ -1,7 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <Core/Field.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Core/Names.h>
|
||||
#include <Poco/Util/XMLConfiguration.h>
|
||||
#include <Common/PODArray.h>
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <IO/WriteIntText.h>
|
||||
#include <Common/formatIPv6.h>
|
||||
#include <iostream>
|
||||
#include <btrie.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
|
@ -3,17 +3,19 @@
|
||||
#include <Dictionaries/IDictionary.h>
|
||||
#include <Dictionaries/IDictionarySource.h>
|
||||
#include <Dictionaries/DictionaryStructure.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Columns/ColumnString.h>
|
||||
#include <Common/Arena.h>
|
||||
#include <ext/range.h>
|
||||
#include <btrie.h>
|
||||
#include <atomic>
|
||||
#include <memory>
|
||||
#include <tuple>
|
||||
#include <common/logger_useful.h>
|
||||
|
||||
struct btrie_s;
|
||||
typedef struct btrie_s btrie_t;
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
|
@ -7,6 +7,9 @@ list(REMOVE_ITEM clickhouse_functions_headers IFunction.h FunctionFactory.h Data
|
||||
|
||||
add_library(clickhouse_functions ${clickhouse_functions_sources})
|
||||
target_link_libraries(clickhouse_functions dbms)
|
||||
target_include_directories (clickhouse_functions BEFORE PUBLIC ${ClickHouse_SOURCE_DIR}/contrib/libfarmhash)
|
||||
target_include_directories (clickhouse_functions BEFORE PUBLIC ${ClickHouse_SOURCE_DIR}/contrib/libmetrohash/src)
|
||||
target_include_directories (clickhouse_functions BEFORE PUBLIC ${CITYHASH_INCLUDE_DIR})
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory (tests)
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <Columns/ColumnConst.h>
|
||||
#include <Columns/ColumnsNumber.h>
|
||||
#include <Common/Arena.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Functions/IFunction.h>
|
||||
#include <DataTypes/EnrichedDataTypePtr.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <IO/WriteBuffer.h>
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <Common/PODArray.h>
|
||||
#include <Common/ProfileEvents.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <Common/unaligned.h>
|
||||
#include <common/unaligned.h>
|
||||
#include <IO/ReadBuffer.h>
|
||||
#include <IO/BufferWithOwnMemory.h>
|
||||
#include <IO/CompressedStream.h>
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <lz4hc.h>
|
||||
#include <zstd.h>
|
||||
|
||||
#include <Common/unaligned.h>
|
||||
#include <common/unaligned.h>
|
||||
#include <Core/Types.h>
|
||||
|
||||
#include <IO/CompressedWriteBuffer.h>
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <common/exp10.h>
|
||||
|
||||
#include <Core/Types.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <Common/StringUtils.h>
|
||||
#include <Common/Arena.h>
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <Core/Types.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <Common/StringUtils.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
|
||||
#include <IO/WriteBuffer.h>
|
||||
#include <IO/WriteIntText.h>
|
||||
|
@ -6,7 +6,7 @@
|
||||
#include <Common/Arena.h>
|
||||
#include <Common/UInt128.h>
|
||||
#include <Core/Defines.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Columns/IColumn.h>
|
||||
#include <Columns/ColumnsNumber.h>
|
||||
#include <Columns/ColumnFixedString.h>
|
||||
|
@ -8,11 +8,11 @@
|
||||
|
||||
#include <common/logger_useful.h>
|
||||
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/Arena.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Common/HashTable/TwoLevelHashMap.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
#include <DataStreams/IBlockInputStream.h>
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <Core/Types.h>
|
||||
#include <Common/Exception.h>
|
||||
#include <Common/UInt128.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <thread>
|
||||
#include <future>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
#include <Poco/DirectoryIterator.h>
|
||||
#include <Poco/FileStream.h>
|
||||
|
@ -30,6 +30,8 @@ target_link_libraries (hash_map_string_2 dbms)
|
||||
|
||||
add_executable (hash_map_string_3 hash_map_string_3.cpp)
|
||||
target_link_libraries (hash_map_string_3 dbms)
|
||||
target_include_directories (hash_map_string_3 BEFORE PRIVATE ${ClickHouse_SOURCE_DIR}/contrib/libfarmhash)
|
||||
target_include_directories (hash_map_string_3 BEFORE PRIVATE ${ClickHouse_SOURCE_DIR}/contrib/libmetrohash/src)
|
||||
|
||||
add_executable (hash_map_string_small hash_map_string_small.cpp)
|
||||
target_link_libraries (hash_map_string_small dbms)
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include <IO/ReadHelpers.h>
|
||||
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <IO/ReadBufferFromFile.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
#include <IO/CompressedReadBuffer.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Interpreters/AggregationCommon.h>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <IO/ReadBufferFromFile.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
#include <IO/CompressedReadBuffer.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Interpreters/AggregationCommon.h>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <IO/ReadBufferFromFile.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
#include <IO/CompressedReadBuffer.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Interpreters/AggregationCommon.h>
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include <IO/ReadBufferFromFile.h>
|
||||
#include <IO/ReadHelpers.h>
|
||||
#include <IO/CompressedReadBuffer.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Interpreters/AggregationCommon.h>
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include <Poco/Util/Application.h>
|
||||
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <AggregateFunctions/ReservoirSampler.h>
|
||||
|
||||
#include <boost/program_options.hpp>
|
||||
|
@ -12,6 +12,7 @@ add_library(clickhouse-server
|
||||
StatusFile.cpp
|
||||
ReplicasStatusHandler.cpp)
|
||||
target_link_libraries(clickhouse-server daemon clickhouse_storages_system clickhouse_functions clickhouse_aggregate_functions clickhouse_table_functions)
|
||||
target_include_directories (clickhouse-server PUBLIC ${ClickHouse_SOURCE_DIR}/libs/libdaemon/include)
|
||||
|
||||
add_library(clickhouse-local LocalServer.cpp)
|
||||
target_link_libraries(clickhouse-local dbms clickhouse-server clickhouse_functions clickhouse_aggregate_functions clickhouse_table_functions)
|
||||
@ -31,6 +32,7 @@ target_link_libraries (clickhouse-performance-test dbms ${Boost_PROGRAM_OPTIONS_
|
||||
|
||||
|
||||
add_executable(clickhouse main.cpp)
|
||||
target_include_directories(clickhouse PRIVATE ${COMMON_INCLUDE_DIR})
|
||||
target_link_libraries(clickhouse
|
||||
clickhouse-server
|
||||
clickhouse-client
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include <Client/Connection.h>
|
||||
#include <Common/ConcurrentBoundedQueue.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <Common/getFQDNOrHostName.h>
|
||||
#include <Common/getNumberOfPhysicalCPUCores.h>
|
||||
#include <Core/Types.h>
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <Interpreters/Context.h>
|
||||
#include <Interpreters/Cluster.h>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
#include <Common/ZooKeeper/ZooKeeper.h>
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
|
||||
#include <Poco/DirectoryIterator.h>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
|
||||
#include <ext/range.h>
|
||||
#include <ext/scope_guard.h>
|
||||
|
@ -1,7 +1,5 @@
|
||||
include_directories (include)
|
||||
|
||||
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_include.cmake)
|
||||
|
||||
if (APPLE)
|
||||
if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin" AND NOT "${CMAKE_SYSTEM_VERSION}" VERSION_LESS "16.1.0")
|
||||
set (APPLE_SIERRA_OR_NEWER 1)
|
||||
@ -26,6 +24,7 @@ add_library (common
|
||||
src/exp10.cpp
|
||||
src/JSON.cpp
|
||||
src/getMemoryAmount.cpp
|
||||
src/ThreadPool.cpp
|
||||
src/iostream_debug_helpers.cpp
|
||||
|
||||
include/common/ApplicationServerExt.h
|
||||
@ -43,6 +42,7 @@ add_library (common
|
||||
include/common/strong_typedef.h
|
||||
include/common/JSON.h
|
||||
include/common/getMemoryAmount.h
|
||||
include/common/ThreadPool.h
|
||||
include/common/iostream_debug_helpers.h
|
||||
|
||||
include/ext/bit_cast.h
|
||||
@ -78,7 +78,9 @@ endif ()
|
||||
|
||||
find_package (Threads)
|
||||
|
||||
target_include_directories (common PRIVATE ${CCTZ_INCLUDE_DIR})
|
||||
target_include_directories (common BEFORE PRIVATE ${CCTZ_INCLUDE_DIR})
|
||||
target_include_directories (common BEFORE PUBLIC ${CITYHASH_INCLUDE_DIR})
|
||||
target_include_directories (common BEFORE PUBLIC ${COMMON_INCLUDE_DIR})
|
||||
|
||||
target_link_libraries (
|
||||
common
|
||||
|
@ -2,13 +2,17 @@
|
||||
|
||||
#include <common/DateLUTImpl.h>
|
||||
#include <common/singleton.h>
|
||||
#include <Core/Defines.h>
|
||||
|
||||
#include <unordered_map>
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include <memory>
|
||||
|
||||
// Also defined in Core/Defines.h
|
||||
#if !defined(ALWAYS_INLINE)
|
||||
#define ALWAYS_INLINE __attribute__((__always_inline__))
|
||||
#endif
|
||||
|
||||
|
||||
/// This class provides lazy initialization and lookup of singleton DateLUTImpl objects for a given timezone.
|
||||
class DateLUT : public Singleton<DateLUT>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include <typeinfo>
|
||||
#include <Poco/Exception.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
#include <common/Types.h>
|
||||
|
||||
|
||||
|
@ -5,14 +5,15 @@
|
||||
#include <functional>
|
||||
#include <ostream>
|
||||
|
||||
#include <common/Types.h>
|
||||
#include <common/unaligned.h>
|
||||
|
||||
#include <city.h>
|
||||
|
||||
#if __SSE2__
|
||||
#include <emmintrin.h>
|
||||
#endif
|
||||
|
||||
#include <city.h>
|
||||
|
||||
#include <Core/Types.h>
|
||||
#include <Common/unaligned.h>
|
||||
|
||||
|
||||
/// The thing to avoid creating strings to find substrings in the hash table.
|
||||
@ -33,7 +34,6 @@ struct StringRef
|
||||
|
||||
using StringRefs = std::vector<StringRef>;
|
||||
|
||||
using UInt64 = DB::UInt64;
|
||||
|
||||
#if __SSE2__
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <Core/Defines.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <iostream>
|
||||
|
||||
|
@ -16,7 +16,7 @@ target_link_libraries (date_lut2 common ${PLATFORM_LIBS})
|
||||
target_link_libraries (date_lut3 common ${PLATFORM_LIBS})
|
||||
target_link_libraries (date_lut4 common ${PLATFORM_LIBS})
|
||||
target_link_libraries (date_lut_default_timezone common ${PLATFORM_LIBS})
|
||||
target_link_libraries (multi_version dbms ${Boost_SYSTEM_LIBRARY} ${RT_LIBRARIES})
|
||||
target_link_libraries (multi_version common ${Boost_SYSTEM_LIBRARY} ${RT_LIBRARIES})
|
||||
|
||||
add_executable (unit_tests_libcommon gtest_json_test.cpp gtest_strong_typedef.cpp)
|
||||
target_link_libraries (unit_tests_libcommon gtest_main)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#include <string.h>
|
||||
#include <iostream>
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <functional>
|
||||
#include <common/MultiVersion.h>
|
||||
#include <Poco/Exception.h>
|
||||
|
@ -1,5 +1,4 @@
|
||||
include_directories (include)
|
||||
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_include.cmake)
|
||||
|
||||
add_library (daemon
|
||||
src/BaseDaemon.cpp
|
||||
@ -16,4 +15,6 @@ if (USE_UNWIND)
|
||||
add_definitions(-DUSE_UNWIND=1)
|
||||
target_link_libraries (daemon ${UNWIND_LIBRARY})
|
||||
endif ()
|
||||
|
||||
target_link_libraries (daemon dbms)
|
||||
target_include_directories (daemon PRIVATE ${ClickHouse_SOURCE_DIR}/libs/libpocoext/include)
|
||||
|
@ -1,6 +1,5 @@
|
||||
include_directories (include)
|
||||
include_directories (${ClickHouse_SOURCE_DIR}/libs/libcommon/include)
|
||||
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_include.cmake)
|
||||
|
||||
add_library (mysqlxx
|
||||
src/Connection.cpp
|
||||
|
@ -3,6 +3,6 @@ include_directories (${CMAKE_CURRENT_BINARY_DIR})
|
||||
add_executable (mysqlxx_test mysqlxx_test.cpp)
|
||||
add_executable (failover failover.cpp)
|
||||
|
||||
target_link_libraries (mysqlxx_test mysqlxx dbms ${RT_LIBRARIES})
|
||||
target_link_libraries (mysqlxx_test mysqlxx ${RT_LIBRARIES})
|
||||
target_link_libraries (failover mysqlxx ${Poco_Util_LIBRARY} ${Poco_Foundation_LIBRARY})
|
||||
target_link_rt_by_force (failover)
|
||||
|
@ -1,5 +1,3 @@
|
||||
include(${ClickHouse_SOURCE_DIR}/cmake/dbms_include.cmake)
|
||||
|
||||
if (NOT NO_WERROR)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror")
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include <Common/Exception.h>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
|
||||
#include <cstdlib>
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include <Common/Exception.h>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include <Common/Exception.h>
|
||||
|
||||
#include <Common/ThreadPool.h>
|
||||
#include <common/ThreadPool.h>
|
||||
#include <Common/Stopwatch.h>
|
||||
|
||||
#ifdef __APPLE__
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <Common/HashTable/HashMap.h>
|
||||
#include <Common/Arena.h>
|
||||
#include <ext/bit_cast.h>
|
||||
#include <Core/StringRef.h>
|
||||
#include <common/StringRef.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
|
Loading…
Reference in New Issue
Block a user