Move pdqsort

This commit is contained in:
Azat Khuzhin 2022-01-18 00:37:14 +03:00
parent 2bd688402a
commit 7420bd9b18
6 changed files with 11 additions and 9 deletions

View File

@ -491,7 +491,6 @@ include (cmake/find/libgsasl.cmake)
include (cmake/find/cyrus-sasl.cmake)
include (cmake/find/llvm.cmake)
include (cmake/find/libxml2.cmake)
include (cmake/find/pdqsort.cmake)
include (cmake/find/curl.cmake)
include (cmake/find/s3.cmake)
include (cmake/find/nlp.cmake)

View File

@ -1,2 +0,0 @@
set(PDQSORT_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/pdqsort)
message(STATUS "Using pdqsort: ${PDQSORT_INCLUDE_DIR}")

View File

@ -22,6 +22,7 @@ endif()
set_property(DIRECTORY PROPERTY EXCLUDE_FROM_ALL 1)
add_subdirectory (miniselect-cmake)
add_subdirectory (pdqsort-cmake)
add_subdirectory (sparsehash-c11-cmake)
add_subdirectory (abseil-cpp-cmake)
add_subdirectory (magic-enum-cmake)

View File

@ -0,0 +1,3 @@
add_library(_pdqsort INTERFACE)
target_include_directories(_pdqsort SYSTEM BEFORE INTERFACE ${ClickHouse_SOURCE_DIR}/contrib/pdqsort)
add_library(ch_contrib::pdqsort ALIAS _pdqsort)

View File

@ -378,10 +378,12 @@ dbms_target_link_libraries (
target_include_directories(clickhouse_common_io PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/Core/include") # uses some includes from core
dbms_target_include_directories(PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/Core/include")
target_include_directories(clickhouse_common_io SYSTEM BEFORE PUBLIC ${PDQSORT_INCLUDE_DIR})
dbms_target_include_directories(SYSTEM BEFORE PUBLIC ${PDQSORT_INCLUDE_DIR})
target_link_libraries(clickhouse_common_io PUBLIC ch_contrib::miniselect)
dbms_target_link_libraries(PUBLIC ch_contrib::miniselect)
target_link_libraries(clickhouse_common_io PUBLIC
ch_contrib::miniselect
ch_contrib::pdqsort)
dbms_target_link_libraries(PUBLIC
ch_contrib::miniselect
ch_contrib::pdqsort)
dbms_target_link_libraries(PRIVATE ch_contrib::zstd)
target_link_libraries (clickhouse_common_io PUBLIC ch_contrib::zstd)

View File

@ -23,8 +23,7 @@ add_executable (compact_array compact_array.cpp)
target_link_libraries (compact_array PRIVATE clickhouse_common_io)
add_executable (radix_sort radix_sort.cpp)
target_link_libraries (radix_sort PRIVATE clickhouse_common_io)
target_include_directories(radix_sort SYSTEM PRIVATE ${PDQSORT_INCLUDE_DIR})
target_link_libraries (radix_sort PRIVATE clickhouse_common_io ch_contrib::pdqsort)
add_executable (arena_with_free_lists arena_with_free_lists.cpp)
target_link_libraries (arena_with_free_lists PRIVATE dbms)