mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge branch 'use-internal-ssl'
This commit is contained in:
commit
4339aa49ca
@ -61,7 +61,7 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set (COMMON_WARNING_FLAGS "${COMMON_WARNING_FLAGS} -Wno-unused-command-line-argument")
|
||||
endif ()
|
||||
|
||||
if (ARCH_LINUX)
|
||||
if (OS_LINUX)
|
||||
set (CXX11_ABI "ENABLE" CACHE STRING "Use C++11 ABI: DEFAULT, ENABLE, DISABLE")
|
||||
endif ()
|
||||
|
||||
@ -86,7 +86,7 @@ endif ()
|
||||
if (CMAKE_LIBRARY_ARCHITECTURE MATCHES "amd64.*|x86_64.*|AMD64.*")
|
||||
option (USE_INTERNAL_MEMCPY "Use internal implementation of 'memcpy' function instead of provided by libc. Only for x86_64." ON)
|
||||
|
||||
if (ARCH_LINUX)
|
||||
if (OS_LINUX)
|
||||
option (GLIBC_COMPATIBILITY "Set to TRUE to enable compatibility with older glibc libraries. Only for x86_64, Linux. Implies USE_INTERNAL_MEMCPY." ON)
|
||||
endif()
|
||||
endif ()
|
||||
@ -160,7 +160,7 @@ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${COMPILER_FLAGS} -fn
|
||||
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -O3 ${CMAKE_C_FLAGS_ADD}")
|
||||
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0 -g3 -ggdb3 -fno-inline ${CMAKE_C_FLAGS_ADD}")
|
||||
|
||||
if (MAKE_STATIC_LIBRARIES AND NOT APPLE AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND ARCH_FREEBSD))
|
||||
if (MAKE_STATIC_LIBRARIES AND NOT APPLE AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND OS_FREEBSD))
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
|
||||
|
||||
# Along with executables, we also build example of shared library for "library dictionary source"; and it also should be self-contained.
|
||||
@ -171,7 +171,7 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
|
||||
include (cmake/test_compiler.cmake)
|
||||
|
||||
if (ARCH_LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
if (OS_LINUX AND CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${GLIBC_COMPATIBILITY_LINK_FLAGS} ${CXX11_ABI_FLAGS}")
|
||||
|
||||
option (USE_LIBCXX "Use libc++ and libc++abi instead of libstdc++ (only make sense on Linux with Clang)" ${HAVE_LIBCXX})
|
||||
@ -240,7 +240,7 @@ else ()
|
||||
set(NOT_UNBUNDLED 1)
|
||||
endif ()
|
||||
# Using system libs can cause lot of warnings in includes.
|
||||
if (UNBUNDLED OR NOT (ARCH_LINUX OR APPLE) OR ARCH_32)
|
||||
if (UNBUNDLED OR NOT (OS_LINUX OR APPLE) OR ARCH_32)
|
||||
option (NO_WERROR "Disable -Werror compiler option" ON)
|
||||
endif ()
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
# ODBC_LIBRARIES, the libraries to link against to use ODBC
|
||||
# ODBC_FOUND. If false, you cannot build anything that requires ODBC.
|
||||
|
||||
option (ENABLE_ODBC "Enable ODBC" ${ARCH_LINUX})
|
||||
if (ARCH_LINUX)
|
||||
option (ENABLE_ODBC "Enable ODBC" ${OS_LINUX})
|
||||
if (OS_LINUX)
|
||||
option (USE_INTERNAL_ODBC_LIBRARY "Set to FALSE to use system odbc library instead of bundled" ${NOT_UNBUNDLED})
|
||||
else ()
|
||||
option (USE_INTERNAL_ODBC_LIBRARY "Set to FALSE to use system odbc library instead of bundled" OFF)
|
||||
|
@ -13,10 +13,10 @@ if ( ( ARCH_ARM AND NOT ARCH_AARCH64 ) OR ARCH_I386)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_SYSTEM MATCHES "Linux")
|
||||
set (ARCH_LINUX 1)
|
||||
set (OS_LINUX 1)
|
||||
endif ()
|
||||
if (CMAKE_SYSTEM MATCHES "FreeBSD")
|
||||
set (ARCH_FREEBSD 1)
|
||||
set (OS_FREEBSD 1)
|
||||
endif ()
|
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
|
@ -2,7 +2,7 @@
|
||||
# TODO: test new libcpuid - maybe already fixed
|
||||
|
||||
if (NOT ARCH_ARM)
|
||||
if (ARCH_FREEBSD)
|
||||
if (OS_FREEBSD)
|
||||
set (DEFAULT_USE_INTERNAL_CPUID_LIBRARY 1)
|
||||
else ()
|
||||
set (DEFAULT_USE_INTERNAL_CPUID_LIBRARY ${NOT_UNBUNDLED})
|
||||
|
@ -1,4 +1,4 @@
|
||||
if (ARCH_FREEBSD)
|
||||
if (OS_FREEBSD)
|
||||
find_library (EXECINFO_LIBRARY execinfo)
|
||||
find_library (ELF_LIBRARY elf)
|
||||
message (STATUS "Using execinfo: ${EXECINFO_LIBRARY}")
|
||||
|
@ -15,8 +15,8 @@
|
||||
# ODBC_LIBRARIES, the libraries to link against to use ODBC
|
||||
# ODBC_FOUND. If false, you cannot build anything that requires ODBC.
|
||||
|
||||
option (ENABLE_ODBC "Enable ODBC" ${ARCH_LINUX})
|
||||
if (ARCH_LINUX)
|
||||
option (ENABLE_ODBC "Enable ODBC" ${OS_LINUX})
|
||||
if (OS_LINUX)
|
||||
option (USE_INTERNAL_ODBC_LIBRARY "Set to FALSE to use system odbc library instead of bundled" ${NOT_UNBUNDLED})
|
||||
else ()
|
||||
option (USE_INTERNAL_ODBC_LIBRARY "Set to FALSE to use system odbc library instead of bundled" OFF)
|
||||
|
@ -13,7 +13,7 @@ endif ()
|
||||
if (NOT USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||
find_library (RDKAFKA_LIB rdkafka)
|
||||
find_path (RDKAFKA_INCLUDE_DIR NAMES librdkafka/rdkafka.h PATHS ${RDKAFKA_INCLUDE_PATHS})
|
||||
if (USE_STATIC_LIBRARIES AND NOT ARCH_FREEBSD)
|
||||
if (USE_STATIC_LIBRARIES AND NOT OS_FREEBSD)
|
||||
find_library (SASL2_LIBRARY sasl2)
|
||||
endif ()
|
||||
endif ()
|
||||
|
@ -1,7 +1,7 @@
|
||||
if (APPLE)
|
||||
# lib from libs/libcommon
|
||||
set (RT_LIBRARY "apple_rt")
|
||||
elseif (ARCH_FREEBSD)
|
||||
elseif (OS_FREEBSD)
|
||||
find_library (RT_LIBRARY rt)
|
||||
else ()
|
||||
set (RT_LIBRARY "")
|
||||
|
@ -1,4 +1,4 @@
|
||||
option (USE_INTERNAL_SSL_LIBRARY "Set to FALSE to use system *ssl library instead of bundled" ${ARCH_LINUX})
|
||||
option (USE_INTERNAL_SSL_LIBRARY "Set to FALSE to use system *ssl library instead of bundled" ${OS_LINUX})
|
||||
|
||||
set (OPENSSL_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES})
|
||||
|
||||
|
@ -17,7 +17,7 @@ if (NOT ZLIB_FOUND)
|
||||
set (USE_INTERNAL_ZLIB_LIBRARY 1)
|
||||
set (ZLIB_COMPAT 1) # for zlib-ng, also enables WITH_GZFILEOP
|
||||
set (WITH_NATIVE_INSTRUCTIONS ${ARCHNATIVE})
|
||||
if (ARCH_FREEBSD OR ARCH_I386)
|
||||
if (OS_FREEBSD OR ARCH_I386)
|
||||
set (WITH_OPTIM 0 CACHE INTERNAL "") # Bug in assembler
|
||||
endif ()
|
||||
if (ARCH_AARCH64)
|
||||
|
@ -57,6 +57,8 @@ ${CMAKE_CURRENT_SOURCE_DIR}/linux_x86_64/libmariadb/ma_client_plugin.c
|
||||
|
||||
add_library(mysqlclient STATIC ${SRCS})
|
||||
|
||||
target_link_libraries(mysqlclient ${OPENSSL_LIBRARIES})
|
||||
|
||||
target_include_directories(mysqlclient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/linux_x86_64/include)
|
||||
target_include_directories(mysqlclient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/common/include)
|
||||
target_include_directories(mysqlclient PUBLIC ${MARIADB_CLIENT_SOURCE_DIR}/include)
|
||||
|
@ -85,7 +85,7 @@ list (APPEND dbms_headers src/TableFunctions/ITableFunction.h src/TableFunctions
|
||||
|
||||
add_library(clickhouse_common_io ${SPLIT_SHARED} ${clickhouse_common_io_headers} ${clickhouse_common_io_sources})
|
||||
|
||||
if (ARCH_FREEBSD)
|
||||
if (OS_FREEBSD)
|
||||
target_compile_definitions (clickhouse_common_io PUBLIC CLOCK_MONOTONIC_COARSE=CLOCK_MONOTONIC_FAST)
|
||||
endif ()
|
||||
|
||||
|
@ -19,7 +19,7 @@ if (CLICKHOUSE_SPLIT_BINARY)
|
||||
install (TARGETS clickhouse-server ${CLICKHOUSE_ALL_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT clickhouse)
|
||||
endif ()
|
||||
|
||||
if (ARCH_LINUX)
|
||||
if (OS_LINUX)
|
||||
set (GLIBC_MAX_REQUIRED 2.4)
|
||||
add_test(NAME GLIBC_required_version COMMAND bash -c "readelf -s ${CMAKE_CURRENT_BINARY_DIR}/../clickhouse-server | grep '@GLIBC' | grep -oP 'GLIBC_[\\d\\.]+' | sort | uniq | sort -r | perl -lnE 'exit 1 if $_ gt q{GLIBC_${GLIBC_MAX_REQUIRED}}'")
|
||||
endif ()
|
||||
|
@ -60,7 +60,7 @@ add_check (hashing_read_buffer)
|
||||
add_executable (io_operators operators.cpp)
|
||||
target_link_libraries (io_operators clickhouse_common_io)
|
||||
|
||||
if (ARCH_LINUX)
|
||||
if (OS_LINUX)
|
||||
add_executable(write_buffer_aio write_buffer_aio.cpp)
|
||||
target_link_libraries (write_buffer_aio clickhouse_common_io ${Boost_FILESYSTEM_LIBRARY})
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
|
||||
if (ARCH_FREEBSD)
|
||||
if (OS_FREEBSD)
|
||||
set (PATH_SHARE "/usr/local/share" CACHE STRING "")
|
||||
else ()
|
||||
set (PATH_SHARE "/usr/share" CACHE STRING "")
|
||||
|
@ -1,4 +1,4 @@
|
||||
if (ARCH_FREEBSD OR ARCH_32)
|
||||
if (OS_FREEBSD OR ARCH_32)
|
||||
option (USE_INTERNAL_GPERFTOOLS_LIBRARY "Set to FALSE to use system gperftools (tcmalloc) library instead of bundled" OFF)
|
||||
else ()
|
||||
option (USE_INTERNAL_GPERFTOOLS_LIBRARY "Set to FALSE to use system gperftools (tcmalloc) library instead of bundled" ${NOT_UNBUNDLED})
|
||||
@ -13,7 +13,7 @@ if (ENABLE_TCMALLOC)
|
||||
find_package (Gperftools)
|
||||
endif ()
|
||||
|
||||
if (NOT (GPERFTOOLS_FOUND AND GPERFTOOLS_INCLUDE_DIR AND GPERFTOOLS_TCMALLOC_MINIMAL) AND NOT (ARCH_FREEBSD OR ARCH_32))
|
||||
if (NOT (GPERFTOOLS_FOUND AND GPERFTOOLS_INCLUDE_DIR AND GPERFTOOLS_TCMALLOC_MINIMAL) AND NOT (OS_FREEBSD OR ARCH_32))
|
||||
set (USE_INTERNAL_GPERFTOOLS_LIBRARY 1)
|
||||
set (GPERFTOOLS_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libtcmalloc/include")
|
||||
set (GPERFTOOLS_TCMALLOC_MINIMAL tcmalloc_minimal_internal)
|
||||
|
@ -1,5 +1,5 @@
|
||||
option (ENABLE_JEMALLOC "Set to TRUE to use jemalloc" ${ARCH_LINUX})
|
||||
if (ARCH_LINUX)
|
||||
option (ENABLE_JEMALLOC "Set to TRUE to use jemalloc" ${OS_LINUX})
|
||||
if (OS_LINUX)
|
||||
option (USE_INTERNAL_JEMALLOC_LIBRARY "Set to FALSE to use system jemalloc library instead of bundled" ${NOT_UNBUNDLED})
|
||||
elseif ()
|
||||
option (USE_INTERNAL_JEMALLOC_LIBRARY "Set to FALSE to use system jemalloc library instead of bundled" OFF)
|
||||
|
@ -1,5 +1,5 @@
|
||||
option (ENABLE_MYSQL "Enable MySQL" ${ARCH_LINUX})
|
||||
if (ARCH_LINUX)
|
||||
option (ENABLE_MYSQL "Enable MySQL" ${OS_LINUX})
|
||||
if (OS_LINUX)
|
||||
option (USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
|
||||
else ()
|
||||
option (USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" OFF)
|
||||
|
Loading…
Reference in New Issue
Block a user