forked from pingcap/tiflash
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
storage: Optimize Vector Index (pingcap#232)
Signed-off-by: Wish <breezewish@outlook.com> Co-authored-by: Lloyd-Pottiger <60744015+Lloyd-Pottiger@users.noreply.github.com>
- Loading branch information
1 parent
19cecc1
commit 8568116
Showing
19 changed files
with
506 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/download/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
include(ExternalProject) | ||
|
||
# hdf5 is too large. Instead of adding as a submodule, let's simply download from GitHub. | ||
ExternalProject_Add(hdf5-external | ||
PREFIX ${CMAKE_CURRENT_BINARY_DIR} | ||
DOWNLOAD_DIR ${TiFlash_SOURCE_DIR}/contrib/hdf5-cmake/download | ||
URL https://github.com/HDFGroup/hdf5/archive/refs/tags/hdf5_1.14.4.3.zip | ||
URL_HASH MD5=bc987d22e787290127aacd7b99b4f31e | ||
CMAKE_ARGS | ||
-DCMAKE_BUILD_TYPE=Release | ||
-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR> | ||
-DBUILD_STATIC_LIBS=ON | ||
-DBUILD_SHARED_LIBS=OFF | ||
-DBUILD_TESTING=OFF | ||
-DHDF5_BUILD_HL_LIB=OFF | ||
-DHDF5_BUILD_TOOLS=OFF | ||
-DHDF5_BUILD_CPP_LIB=ON | ||
-DHDF5_BUILD_EXAMPLES=OFF | ||
-DHDF5_ENABLE_Z_LIB_SUPPORT=OFF | ||
-DHDF5_ENABLE_SZIP_SUPPORT=OFF | ||
BUILD_BYPRODUCTS <INSTALL_DIR>/lib/${CMAKE_FIND_LIBRARY_PREFIXES}hdf5.a # Workaround for Ninja | ||
USES_TERMINAL_DOWNLOAD TRUE | ||
USES_TERMINAL_CONFIGURE TRUE | ||
USES_TERMINAL_BUILD TRUE | ||
USES_TERMINAL_INSTALL TRUE | ||
EXCLUDE_FROM_ALL TRUE | ||
DOWNLOAD_EXTRACT_TIMESTAMP TRUE | ||
) | ||
|
||
ExternalProject_Get_Property(hdf5-external INSTALL_DIR) | ||
|
||
add_library(tiflash_contrib::hdf5 STATIC IMPORTED GLOBAL) | ||
set_target_properties(tiflash_contrib::hdf5 PROPERTIES | ||
IMPORTED_LOCATION ${INSTALL_DIR}/lib/${CMAKE_FIND_LIBRARY_PREFIXES}hdf5.a | ||
) | ||
add_dependencies(tiflash_contrib::hdf5 hdf5-external) | ||
|
||
file(MAKE_DIRECTORY ${INSTALL_DIR}/include) | ||
target_include_directories(tiflash_contrib::hdf5 SYSTEM INTERFACE | ||
${INSTALL_DIR}/include | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set(HIGHFIVE_PROJECT_DIR "${TiFlash_SOURCE_DIR}/contrib/highfive") | ||
set(HIGHFIVE_SOURCE_DIR "${HIGHFIVE_PROJECT_DIR}/include") | ||
|
||
if (NOT EXISTS "${HIGHFIVE_SOURCE_DIR}/highfive/highfive.hpp") | ||
message (FATAL_ERROR "submodule contrib/highfive not found") | ||
endif() | ||
|
||
add_library(_highfive INTERFACE) | ||
|
||
target_include_directories(_highfive SYSTEM INTERFACE | ||
${HIGHFIVE_SOURCE_DIR} | ||
) | ||
|
||
target_link_libraries(_highfive INTERFACE | ||
tiflash_contrib::hdf5 | ||
) | ||
|
||
add_library(tiflash_contrib::highfive ALIAS _highfive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.