diff --git a/cpp/.gitignore b/cpp/.gitignore index 718081be75596480141ebfd5c3f6df94b90acf8d..71ee3f37704ffb7de21b320698d6334d2d75faa4 100644 --- a/cpp/.gitignore +++ b/cpp/.gitignore @@ -2,7 +2,6 @@ milvus/ conf/server_config.yaml conf/log_config.conf version.h -megasearch/ lcov_out/ base.info output.info diff --git a/cpp/build.sh b/cpp/build.sh index 1baad7d1c6c689c2c6f21b7190f1354d1046b177..104ecc89d3d8c85f352d550de3048cf739a775b3 100755 --- a/cpp/build.sh +++ b/cpp/build.sh @@ -11,8 +11,9 @@ PROFILING="OFF" BUILD_FAISS_WITH_MKL="OFF" USE_JFROG_CACHE="OFF" KNOWHERE_OPTS="" +KNOWHERE_BUILD_DIR="`pwd`/thirdparty/knowhere/knowhere" -while getopts "p:d:t:uhlrcgmj" arg +while getopts "p:d:t:k:uhlrcgmj" arg do case $arg in t) @@ -44,6 +45,9 @@ do g) PROFILING="ON" ;; + k) + KNOWHERE_BUILD_DIR=$OPTARG + ;; m) BUILD_FAISS_WITH_MKL="ON" ;; @@ -63,11 +67,12 @@ parameter: -r: remove previous build directory(default: OFF) -c: code coverage(default: OFF) -g: profiling(default: OFF) +-k: specify knowhere header/binary path -m: build faiss with MKL(default: OFF) -j: use jfrog cache build directory usage: -./build.sh -t \${BUILD_TYPE} [-u] [-h] [-g] [-r] [-c] [-m] [-j] +./build.sh -t \${BUILD_TYPE} [-u] [-h] [-g] [-r] [-c] [-k] [-m] [-j] " exit 0 ;; @@ -83,12 +88,6 @@ if [[ ! -d cmake_build ]]; then MAKE_CLEAN="ON" fi -# Knowhere build output path -KNOWHERE_BUILD_DIR="`pwd`/thirdparty/knowhere/knowhere" -pushd `pwd`/thirdparty/knowhere -./build.sh -t ${BUILD_TYPE} -p ${KNOWHERE_BUILD_DIR} ${KNOWHERE_OPTS} -popd - cd cmake_build CUDA_COMPILER=/usr/local/cuda/bin/nvcc