mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-11-30 19:08:30 +08:00
MS-306 - Optimize build efficiency
Former-commit-id: e221cb4134622b5f61d0e0fb48f678c17427a21d
This commit is contained in:
parent
bcf3992cdb
commit
c49bebe0ef
14
cpp/build.sh
14
cpp/build.sh
@ -9,8 +9,10 @@ BUILD_COVERAGE="OFF"
|
||||
DB_PATH="/opt/milvus"
|
||||
PROFILING="OFF"
|
||||
BUILD_FAISS_WITH_MKL="OFF"
|
||||
USE_JFROG_CACHE="OFF"
|
||||
KNOWHERE_OPTS=""
|
||||
|
||||
while getopts "p:d:t:uhlrcgm" arg
|
||||
while getopts "p:d:t:uhlrcgmj" arg
|
||||
do
|
||||
case $arg in
|
||||
t)
|
||||
@ -44,6 +46,10 @@ do
|
||||
m)
|
||||
BUILD_FAISS_WITH_MKL="ON"
|
||||
;;
|
||||
j)
|
||||
USE_JFROG_CACHE="ON"
|
||||
KNOWHERE_OPTS="${KNOWHERE_OPTS} -j"
|
||||
;;
|
||||
h) # help
|
||||
echo "
|
||||
|
||||
@ -57,9 +63,10 @@ parameter:
|
||||
-c: code coverage(default: OFF)
|
||||
-g: profiling(default: OFF)
|
||||
-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]
|
||||
./build.sh -t \${BUILD_TYPE} [-u] [-h] [-g] [-r] [-c] [-m] [-j]
|
||||
"
|
||||
exit 0
|
||||
;;
|
||||
@ -78,7 +85,7 @@ fi
|
||||
# Build Knowhere
|
||||
KNOWHERE_BUILD_DIR="`pwd`/thirdparty/knowhere_build"
|
||||
pushd `pwd`/thirdparty/knowhere
|
||||
./build.sh -t Release -p ${KNOWHERE_BUILD_DIR}
|
||||
./build.sh -t Release -p ${KNOWHERE_BUILD_DIR} ${KNOWHERE_OPTS}
|
||||
popd
|
||||
|
||||
cd cmake_build
|
||||
@ -96,6 +103,7 @@ if [[ ${MAKE_CLEAN} == "ON" ]]; then
|
||||
-DMILVUS_ENABLE_PROFILING=${PROFILING} \
|
||||
-DBUILD_FAISS_WITH_MKL=${BUILD_FAISS_WITH_MKL} \
|
||||
-DKNOWHERE_BUILD_DIR=${KNOWHERE_BUILD_DIR} \
|
||||
-DUSE_JFROG_CACHE=${USE_JFROG_CACHE} \
|
||||
$@ ../"
|
||||
echo ${CMAKE_CMD}
|
||||
|
||||
|
@ -162,7 +162,7 @@ set(THIRDPARTY_DIR "${MILVUS_SOURCE_DIR}/thirdparty")
|
||||
# ----------------------------------------------------------------------
|
||||
# JFrog
|
||||
if(NOT DEFINED USE_JFROG_CACHE)
|
||||
set(USE_JFROG_CACHE "ON")
|
||||
set(USE_JFROG_CACHE "OFF")
|
||||
endif()
|
||||
if(USE_JFROG_CACHE STREQUAL "ON")
|
||||
set(JFROG_ARTFACTORY_CACHE_URL "http://192.168.1.201:80/artifactory/generic-local/milvus/thirdparty/cache/${CMAKE_OS_NAME}/${MILVUS_BUILD_ARCH}/${BUILD_TYPE}")
|
||||
|
Loading…
Reference in New Issue
Block a user