mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Merge pull request #5673 from proller/fix25
Cmake: better USE_STATIC_LIBRARIES and SPLIT_SHARED_LIBRARIES handling
This commit is contained in:
commit
8236f78de9
@ -67,7 +67,11 @@ if (NOT MAKE_STATIC_LIBRARIES)
|
||||
option (CLICKHOUSE_SPLIT_BINARY "Make several binaries instead one bundled (clickhouse-server, clickhouse-client, ... )" OFF)
|
||||
endif ()
|
||||
|
||||
if (SPLIT_SHARED_LIBRARIES)
|
||||
if (MAKE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
||||
message(FATAL_ERROR "Defining SPLIT_SHARED_LIBRARIES=1 without MAKE_STATIC_LIBRARIES=0 has no effect.")
|
||||
endif()
|
||||
|
||||
if (NOT MAKE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
||||
set(BUILD_SHARED_LIBS 1 CACHE INTERNAL "")
|
||||
endif ()
|
||||
|
||||
@ -110,7 +114,7 @@ option (ENABLE_TESTS "Enables tests" ON)
|
||||
if (CMAKE_SYSTEM_PROCESSOR MATCHES "amd64|x86_64")
|
||||
option (USE_INTERNAL_MEMCPY "Use internal implementation of 'memcpy' function instead of provided by libc. Only for x86_64." ON)
|
||||
|
||||
if (OS_LINUX AND NOT UNBUNDLED AND MAKE_STATIC_LIBRARIES AND CMAKE_VERSION VERSION_GREATER "3.9.0")
|
||||
if (OS_LINUX AND NOT UNBUNDLED AND MAKE_STATIC_LIBRARIES AND NOT SPLIT_SHARED_LIBRARIES AND CMAKE_VERSION VERSION_GREATER "3.9.0")
|
||||
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 ()
|
||||
@ -384,5 +388,26 @@ if (GLIBC_COMPATIBILITY)
|
||||
add_glibc_compat(arrow)
|
||||
add_glibc_compat(protoc)
|
||||
add_glibc_compat(thrift_static)
|
||||
add_glibc_compat(cityhash)
|
||||
add_glibc_compat(farmhash)
|
||||
add_glibc_compat(murmurhash)
|
||||
add_glibc_compat(metrohash)
|
||||
add_glibc_compat(metrohash128)
|
||||
add_glibc_compat(consistent-hashing)
|
||||
add_glibc_compat(double-conversion)
|
||||
add_glibc_compat(cctz)
|
||||
add_glibc_compat(kj)
|
||||
add_glibc_compat(simdjson)
|
||||
add_glibc_compat(apple_rt)
|
||||
add_glibc_compat(re2)
|
||||
add_glibc_compat(re2_st)
|
||||
add_glibc_compat(hs_compile_shared)
|
||||
add_glibc_compat(hs_exec_shared)
|
||||
add_glibc_compat(hs_shared)
|
||||
add_glibc_compat(widechar_width)
|
||||
add_glibc_compat(string_utils)
|
||||
add_glibc_compat(consistent-hashing-sumbur)
|
||||
add_glibc_compat(boost_program_options_internal)
|
||||
add_glibc_compat(boost_system_internal)
|
||||
add_glibc_compat(boost_regex_internal)
|
||||
endif ()
|
||||
|
@ -20,6 +20,6 @@ if(MAKE_STATIC_LIBRARIES)
|
||||
list(APPEND glibc_compatibility_sources libcxxabi/cxa_thread_atexit.cpp)
|
||||
endif()
|
||||
|
||||
add_library(glibc-compatibility ${glibc_compatibility_sources})
|
||||
add_library(glibc-compatibility STATIC ${glibc_compatibility_sources})
|
||||
|
||||
target_include_directories(glibc-compatibility PRIVATE libcxxabi)
|
||||
|
Loading…
Reference in New Issue
Block a user