milvus/scripts/azure_build.sh
PowderLi 5f00bad4b8
fix: link with install path's libblob-chunk-manager (#29496)
issue: #29494

1. link with install path's libblob-chunk-manager
2. performance of `ShouldBindWith` is better than `ShouldBindBodyWith`
3. the middleware shouldn't read the unrefreshed parameter repeatly

Signed-off-by: PowderLi <min.li@zilliz.com>
2023-12-31 20:02:48 +08:00

53 lines
1.0 KiB
Bash

#!/usr/bin/env bash
BUILD_UNITTEST="OFF"
while getopts "p:s:t:h" arg; do
case $arg in
p)
INSTALL_PREFIX=$OPTARG
;;
s)
SOURCE_DIR=$OPTARG
;;
t)
BUILD_UNITTEST=$OPTARG
;;
h) # help
echo "
parameter:
-p: install prefix
-s: source directory
-t: ON means build with unittest
-h: help
usage:
./azure_build.sh -p \${INSTALL_PREFIX} -s \${SOURCE_DIR} [-t \${BUILD_UNITTEST}] [-h]
"
exit 0
;;
?)
echo "ERROR! unknown argument"
exit 1
;;
esac
done
ARCHITECTURE=$(uname -m)
if [[ ${ARCHITECTURE} == "aarch64" ]]; then
export VCPKG_FORCE_SYSTEM_BINARIES="arm"
fi
AZURE_CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
${SOURCE_DIR}"
if [[ -f "/opt/vcpkg/scripts/buildsystems/vcpkg.cmake" ]]; then
AZURE_CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \
-DCMAKE_TOOLCHAIN_FILE=/opt/vcpkg/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \
${SOURCE_DIR}"
fi
echo ${AZURE_CMAKE_CMD}
${AZURE_CMAKE_CMD}
make install