Remove unbundled double-conversion support

This commit is contained in:
Azat Khuzhin 2022-01-17 21:45:54 +03:00
parent 6c0fa21025
commit 7c3a3cebb5
7 changed files with 10 additions and 58 deletions

View File

@ -488,7 +488,6 @@ message (STATUS
include (GNUInstallDirs) include (GNUInstallDirs)
include (cmake/contrib_finder.cmake) include (cmake/contrib_finder.cmake)
find_contrib_lib(double-conversion) # Must be before parquet
include (cmake/find/icu.cmake) include (cmake/find/icu.cmake)
include (cmake/find/xz.cmake) include (cmake/find/xz.cmake)
include (cmake/find/ltdl.cmake) # for odbc include (cmake/find/ltdl.cmake) # for odbc

View File

@ -1,44 +0,0 @@
# - Try to find double-conversion headers and libraries.
#
# Usage of this module as follows:
#
# find_package(double-conversion)
#
# Variables used by this module, they can change the default behaviour and need
# to be set before calling find_package:
#
# DOUBLE_CONVERSION_ROOT_DIR Set this variable to the root installation of
# double-conversion if the module has problems finding
# the proper installation path.
#
# Variables defined by this module:
#
# DOUBLE_CONVERSION_FOUND System has double-conversion libs/headers
# DOUBLE_CONVERSION_LIBRARIES The double-conversion library/libraries
# DOUBLE_CONVERSION_INCLUDE_DIR The location of double-conversion headers
find_path(DOUBLE_CONVERSION_ROOT_DIR
NAMES include/double-conversion/double-conversion.h
)
find_library(DOUBLE_CONVERSION_LIBRARIES
NAMES double-conversion
PATHS ${DOUBLE_CONVERSION_ROOT_DIR}/lib ${BTRIE_CITYHASH_PATHS}
)
find_path(DOUBLE_CONVERSION_INCLUDE_DIR
NAMES double-conversion/double-conversion.h
PATHS ${DOUBLE_CONVERSION_ROOT_DIR}/include ${DOUBLE_CONVERSION_INCLUDE_PATHS}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(double_conversion DEFAULT_MSG
DOUBLE_CONVERSION_LIBRARIES
DOUBLE_CONVERSION_INCLUDE_DIR
)
mark_as_advanced(
DOUBLE_CONVERSION_ROOT_DIR
DOUBLE_CONVERSION_LIBRARIES
DOUBLE_CONVERSION_INCLUDE_DIR
)

View File

@ -16,8 +16,8 @@ list(APPEND dirs ${dirs1})
get_property (dirs1 TARGET roaring PROPERTY INCLUDE_DIRECTORIES) get_property (dirs1 TARGET roaring PROPERTY INCLUDE_DIRECTORIES)
list(APPEND dirs ${dirs1}) list(APPEND dirs ${dirs1})
if (TARGET double-conversion) if (TARGET ch_contrib::double_conversion)
get_property (dirs1 TARGET double-conversion PROPERTY INCLUDE_DIRECTORIES) get_property (dirs1 TARGET ch_contrib::double_conversion PROPERTY INCLUDE_DIRECTORIES)
list(APPEND dirs ${dirs1}) list(APPEND dirs ${dirs1})
endif () endif ()

View File

@ -50,6 +50,7 @@ if (USE_INTERNAL_XZ_LIBRARY)
add_subdirectory (xz-cmake) add_subdirectory (xz-cmake)
endif() endif()
add_subdirectory (double-conversion-cmake)
add_subdirectory (boringssl-cmake) add_subdirectory (boringssl-cmake)
add_subdirectory (poco-cmake) add_subdirectory (poco-cmake)
add_subdirectory (croaring-cmake) add_subdirectory (croaring-cmake)
@ -60,7 +61,7 @@ add_subdirectory (snappy-cmake)
add_subdirectory (rocksdb-cmake) add_subdirectory (rocksdb-cmake)
add_subdirectory (thrift-cmake) add_subdirectory (thrift-cmake)
# parquet/arrow/orc # parquet/arrow/orc
add_subdirectory (arrow-cmake) # requires: snappy, thrift add_subdirectory (arrow-cmake) # requires: snappy, thrift, double-conversion
add_subdirectory (avro-cmake) # requires: snappy add_subdirectory (avro-cmake) # requires: snappy
add_subdirectory (hive-metastore-cmake) # requires: thrift/avro/arrow add_subdirectory (hive-metastore-cmake) # requires: thrift/avro/arrow
add_subdirectory (librdkafka-cmake) add_subdirectory (librdkafka-cmake)
@ -80,10 +81,6 @@ if (USE_INTERNAL_RE2_LIBRARY)
add_subdirectory (re2-cmake) add_subdirectory (re2-cmake)
endif () endif ()
if (USE_INTERNAL_DOUBLE_CONVERSION_LIBRARY)
add_subdirectory (double-conversion-cmake)
endif ()
if (USE_INTERNAL_CITYHASH_LIBRARY) if (USE_INTERNAL_CITYHASH_LIBRARY)
add_subdirectory (cityhash102) add_subdirectory (cityhash102)
endif () endif ()

View File

@ -365,7 +365,7 @@ add_dependencies(_arrow protoc)
target_include_directories(_arrow SYSTEM BEFORE PUBLIC ${ARROW_SRC_DIR}) target_include_directories(_arrow SYSTEM BEFORE PUBLIC ${ARROW_SRC_DIR})
target_include_directories(_arrow SYSTEM BEFORE PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/cpp/src") target_include_directories(_arrow SYSTEM BEFORE PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/cpp/src")
target_link_libraries(_arrow PRIVATE ${DOUBLE_CONVERSION_LIBRARIES}) target_link_libraries(_arrow PRIVATE ch_contrib::double_conversion)
target_link_libraries(_arrow PRIVATE ch_contrib::protobuf) target_link_libraries(_arrow PRIVATE ch_contrib::protobuf)
target_link_libraries(_arrow PRIVATE ch_contrib::lz4) target_link_libraries(_arrow PRIVATE ch_contrib::lz4)
target_link_libraries(_arrow PRIVATE ch_contrib::snappy) target_link_libraries(_arrow PRIVATE ch_contrib::snappy)

View File

@ -1,6 +1,6 @@
SET(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/double-conversion") SET(LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/double-conversion")
add_library(double-conversion add_library(_double-conversion
"${LIBRARY_DIR}/double-conversion/bignum.cc" "${LIBRARY_DIR}/double-conversion/bignum.cc"
"${LIBRARY_DIR}/double-conversion/bignum-dtoa.cc" "${LIBRARY_DIR}/double-conversion/bignum-dtoa.cc"
"${LIBRARY_DIR}/double-conversion/cached-powers.cc" "${LIBRARY_DIR}/double-conversion/cached-powers.cc"
@ -10,4 +10,6 @@ add_library(double-conversion
"${LIBRARY_DIR}/double-conversion/fixed-dtoa.cc" "${LIBRARY_DIR}/double-conversion/fixed-dtoa.cc"
"${LIBRARY_DIR}/double-conversion/strtod.cc") "${LIBRARY_DIR}/double-conversion/strtod.cc")
target_include_directories(double-conversion SYSTEM BEFORE PUBLIC "${LIBRARY_DIR}") target_include_directories(_double-conversion SYSTEM BEFORE PUBLIC "${LIBRARY_DIR}")
add_library(ch_contrib::double_conversion ALIAS _double-conversion)

View File

@ -303,7 +303,7 @@ target_link_libraries (clickhouse_common_io
${LINK_LIBRARIES_ONLY_ON_X86_64} ${LINK_LIBRARIES_ONLY_ON_X86_64}
PUBLIC PUBLIC
common common
${DOUBLE_CONVERSION_LIBRARIES} ch_contrib::double_conversion
dragonbox_to_chars dragonbox_to_chars
) )
@ -481,8 +481,6 @@ if (USE_CASSANDRA)
dbms_target_include_directories (SYSTEM BEFORE PUBLIC ${CASS_INCLUDE_DIR}) dbms_target_include_directories (SYSTEM BEFORE PUBLIC ${CASS_INCLUDE_DIR})
endif() endif()
target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${DOUBLE_CONVERSION_INCLUDE_DIR})
if (USE_MSGPACK) if (USE_MSGPACK)
target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${MSGPACK_INCLUDE_DIR}) target_include_directories (clickhouse_common_io SYSTEM BEFORE PUBLIC ${MSGPACK_INCLUDE_DIR})
endif() endif()