mirror of
https://gitee.com/milvus-io/milvus.git
synced 2025-12-08 10:08:42 +08:00
Fix compilation error of core on macOS (#9317)
Signed-off-by: Xiangyu Wang <xiangyu.wang@zilliz.com>
This commit is contained in:
parent
cd7f83eb95
commit
e281b623d2
@ -2,7 +2,17 @@
|
|||||||
|
|
||||||
# Compile jobs variable; Usage: $ jobs=12 ./build.sh ...
|
# Compile jobs variable; Usage: $ jobs=12 ./build.sh ...
|
||||||
if [[ ! ${jobs+1} ]]; then
|
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
|
fi
|
||||||
|
|
||||||
SOURCE="${BASH_SOURCE[0]}"
|
SOURCE="${BASH_SOURCE[0]}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user