Remove unbundled cityhash support

This commit is contained in:
Azat Khuzhin 2022-01-17 22:09:12 +03:00
parent 8ede97925e
commit f1cc63d900
10 changed files with 12 additions and 59 deletions

View File

@ -523,9 +523,6 @@ include (cmake/find/cassandra.cmake)
include (cmake/find/sentry.cmake)
include (cmake/find/datasketches.cmake)
set (USE_INTERNAL_CITYHASH_LIBRARY ON CACHE INTERNAL "")
find_contrib_lib(cityhash)
find_contrib_lib(farmhash)
if (ENABLE_TESTS)

View File

@ -52,7 +52,7 @@ endif()
target_link_libraries (common
PUBLIC
${CITYHASH_LIBRARIES}
ch_contrib::cityhash
boost::headers_only
boost::system
Poco::Net

View File

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

View File

@ -10,7 +10,7 @@ list(APPEND dirs ${dirs1})
get_property (dirs1 TARGET common PROPERTY INCLUDE_DIRECTORIES)
list(APPEND dirs ${dirs1})
get_property (dirs1 TARGET cityhash PROPERTY INCLUDE_DIRECTORIES)
get_property (dirs1 TARGET ch_contrib::cityhash PROPERTY INCLUDE_DIRECTORIES)
list(APPEND dirs ${dirs1})
get_property (dirs1 TARGET roaring PROPERTY INCLUDE_DIRECTORIES)

View File

@ -77,9 +77,7 @@ endif()
# TODO: refactor the contrib libraries below this comment.
if (USE_INTERNAL_CITYHASH_LIBRARY)
add_subdirectory (cityhash102)
endif ()
add_subdirectory (cityhash102)
if (USE_INTERNAL_FARMHASH_LIBRARY)
add_subdirectory (libfarmhash)

View File

@ -1,8 +1,10 @@
add_library(cityhash
add_library(_cityhash
src/city.cc
include/citycrc.h
include/city.h
src/config.h)
target_include_directories(cityhash SYSTEM BEFORE PUBLIC include)
target_include_directories(cityhash SYSTEM PRIVATE src)
target_include_directories(_cityhash SYSTEM BEFORE PUBLIC include)
target_include_directories(_cityhash SYSTEM PRIVATE src)
add_library(ch_contrib::cityhash ALIAS _cityhash)

View File

@ -23,7 +23,7 @@ list(REMOVE_ITEM clickhouse_aggregate_functions_headers
)
add_library(clickhouse_aggregate_functions ${clickhouse_aggregate_functions_sources})
target_link_libraries(clickhouse_aggregate_functions PRIVATE dbms PUBLIC ${CITYHASH_LIBRARIES})
target_link_libraries(clickhouse_aggregate_functions PRIVATE dbms PUBLIC ch_contrib::cityhash)
if(ENABLE_EXAMPLES)
add_subdirectory(examples)

View File

@ -325,7 +325,7 @@ target_link_libraries(clickhouse_common_io
PUBLIC
boost::program_options
boost::system
${CITYHASH_LIBRARIES}
ch_contrib::cityhash
ch_contrib::zlib
pcg_random
Poco::Foundation

View File

@ -1,5 +1,5 @@
add_executable (hashes_test hashes_test.cpp)
target_link_libraries (hashes_test PRIVATE clickhouse_common_io ${CITYHASH_LIBRARIES})
target_link_libraries (hashes_test PRIVATE clickhouse_common_io ch_contrib::cityhash)
if (TARGET OpenSSL::Crypto)
target_link_libraries (hashes_test PRIVATE OpenSSL::Crypto)
endif()

View File

@ -13,7 +13,7 @@ add_library(clickhouse_functions ${clickhouse_functions_sources})
target_link_libraries(clickhouse_functions
PUBLIC
${BASE64_LIBRARY}
${CITYHASH_LIBRARIES}
ch_contrib::cityhash
${FARMHASH_LIBRARIES}
${FASTOPS_LIBRARY}
clickhouse_dictionaries