mirror of https://github.com/milvus-io/milvus.git
Fix compilation error of core on macOS (#9317)
Signed-off-by: Xiangyu Wang <xiangyu.wang@zilliz.com>pull/9462/head^2
parent
cd7f83eb95
commit
e281b623d2
|
@ -2,7 +2,17 @@
|
|||
|
||||
# Compile jobs variable; Usage: $ jobs=12 ./build.sh ...
|
||||
if [[ ! ${jobs+1} ]]; then
|
||||
jobs=$(nproc)
|
||||
if command -v nproc &> /dev/null
|
||||
# For linux
|
||||
then
|
||||
jobs=$(nproc)
|
||||
elif command -v sysctl &> /dev/null
|
||||
# For macOS
|
||||
then
|
||||
jobs=$(sysctl -n hw.logicalcpu)
|
||||
else
|
||||
jobs=4
|
||||
fi
|
||||
fi
|
||||
|
||||
SOURCE="${BASH_SOURCE[0]}"
|
||||
|
|
Loading…
Reference in New Issue