From 48766c1c2dfd6efc5c875cdf8667cb18e28239e5 Mon Sep 17 00:00:00 2001 From: proller Date: Thu, 30 Aug 2018 21:44:46 +0300 Subject: [PATCH] split libconsistent-hashing --- dbms/src/Functions/CMakeLists.txt | 2 +- libs/CMakeLists.txt | 3 ++- libs/consistent-hashing-sumbur/CMakeLists.txt | 2 ++ .../mailru => consistent-hashing-sumbur}/sumbur.cpp | 0 .../mailru => consistent-hashing-sumbur}/sumbur.h | 0 libs/consistent-hashing/CMakeLists.txt | 2 ++ .../yandex => consistent-hashing}/bitops.h | 0 .../yandex => consistent-hashing}/consistent_hashing.cpp | 0 .../yandex => consistent-hashing}/consistent_hashing.h | 0 .../yandex => consistent-hashing}/popcount.cpp | 0 .../yandex => consistent-hashing}/popcount.h | 0 libs/libconsistent-hashing/CMakeLists.txt | 5 ----- 12 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 libs/consistent-hashing-sumbur/CMakeLists.txt rename libs/{libconsistent-hashing/mailru => consistent-hashing-sumbur}/sumbur.cpp (100%) rename libs/{libconsistent-hashing/mailru => consistent-hashing-sumbur}/sumbur.h (100%) create mode 100644 libs/consistent-hashing/CMakeLists.txt rename libs/{libconsistent-hashing/yandex => consistent-hashing}/bitops.h (100%) rename libs/{libconsistent-hashing/yandex => consistent-hashing}/consistent_hashing.cpp (100%) rename libs/{libconsistent-hashing/yandex => consistent-hashing}/consistent_hashing.h (100%) rename libs/{libconsistent-hashing/yandex => consistent-hashing}/popcount.cpp (100%) rename libs/{libconsistent-hashing/yandex => consistent-hashing}/popcount.h (100%) delete mode 100644 libs/libconsistent-hashing/CMakeLists.txt diff --git a/dbms/src/Functions/CMakeLists.txt b/dbms/src/Functions/CMakeLists.txt index ef285659be2..6c7f86032b6 100644 --- a/dbms/src/Functions/CMakeLists.txt +++ b/dbms/src/Functions/CMakeLists.txt @@ -91,7 +91,7 @@ list(REMOVE_ITEM clickhouse_functions_headers IFunction.h FunctionFactory.h Func add_library(clickhouse_functions ${clickhouse_functions_sources}) -target_link_libraries(clickhouse_functions PUBLIC dbms PRIVATE libconsistent-hashing ${FARMHASH_LIBRARIES} ${METROHASH_LIBRARIES} murmurhash) +target_link_libraries(clickhouse_functions PUBLIC dbms PRIVATE consistent-hashing consistent-hashing-sumbur ${FARMHASH_LIBRARIES} ${METROHASH_LIBRARIES} murmurhash) target_include_directories (clickhouse_functions SYSTEM BEFORE PUBLIC ${DIVIDE_INCLUDE_DIR}) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt index 04b10f326d8..948020cc264 100644 --- a/libs/CMakeLists.txt +++ b/libs/CMakeLists.txt @@ -23,4 +23,5 @@ if (USE_MYSQL) add_subdirectory (libmysqlxx) endif () -add_subdirectory (libconsistent-hashing) +add_subdirectory (consistent-hashing) +add_subdirectory (consistent-hashing-sumbur) diff --git a/libs/consistent-hashing-sumbur/CMakeLists.txt b/libs/consistent-hashing-sumbur/CMakeLists.txt new file mode 100644 index 00000000000..f11b5095f51 --- /dev/null +++ b/libs/consistent-hashing-sumbur/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(consistent-hashing-sumbur sumbur.cpp) +target_include_directories(consistent-hashing-sumbur PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/libs/libconsistent-hashing/mailru/sumbur.cpp b/libs/consistent-hashing-sumbur/sumbur.cpp similarity index 100% rename from libs/libconsistent-hashing/mailru/sumbur.cpp rename to libs/consistent-hashing-sumbur/sumbur.cpp diff --git a/libs/libconsistent-hashing/mailru/sumbur.h b/libs/consistent-hashing-sumbur/sumbur.h similarity index 100% rename from libs/libconsistent-hashing/mailru/sumbur.h rename to libs/consistent-hashing-sumbur/sumbur.h diff --git a/libs/consistent-hashing/CMakeLists.txt b/libs/consistent-hashing/CMakeLists.txt new file mode 100644 index 00000000000..4457fe6e2db --- /dev/null +++ b/libs/consistent-hashing/CMakeLists.txt @@ -0,0 +1,2 @@ +add_library(consistent-hashing consistent_hashing.cpp popcount.cpp) +target_include_directories(consistent-hashing PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/libs/libconsistent-hashing/yandex/bitops.h b/libs/consistent-hashing/bitops.h similarity index 100% rename from libs/libconsistent-hashing/yandex/bitops.h rename to libs/consistent-hashing/bitops.h diff --git a/libs/libconsistent-hashing/yandex/consistent_hashing.cpp b/libs/consistent-hashing/consistent_hashing.cpp similarity index 100% rename from libs/libconsistent-hashing/yandex/consistent_hashing.cpp rename to libs/consistent-hashing/consistent_hashing.cpp diff --git a/libs/libconsistent-hashing/yandex/consistent_hashing.h b/libs/consistent-hashing/consistent_hashing.h similarity index 100% rename from libs/libconsistent-hashing/yandex/consistent_hashing.h rename to libs/consistent-hashing/consistent_hashing.h diff --git a/libs/libconsistent-hashing/yandex/popcount.cpp b/libs/consistent-hashing/popcount.cpp similarity index 100% rename from libs/libconsistent-hashing/yandex/popcount.cpp rename to libs/consistent-hashing/popcount.cpp diff --git a/libs/libconsistent-hashing/yandex/popcount.h b/libs/consistent-hashing/popcount.h similarity index 100% rename from libs/libconsistent-hashing/yandex/popcount.h rename to libs/consistent-hashing/popcount.h diff --git a/libs/libconsistent-hashing/CMakeLists.txt b/libs/libconsistent-hashing/CMakeLists.txt deleted file mode 100644 index af7d4b377ea..00000000000 --- a/libs/libconsistent-hashing/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -cmake_minimum_required(VERSION 2.8) -project(libconsistent-hashing CXX) - -add_library(libconsistent-hashing yandex/consistent_hashing.cpp yandex/popcount.cpp mailru/sumbur.cpp) -target_include_directories(libconsistent-hashing PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})