diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 1c35665d7191f8d5b4b71b2c890b89fce078232a..95112343477ad626a3f5a8c9541bc2a23d297745 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -292,13 +292,17 @@ function check_style() { #================================================= function build_base() { - parallel_number=`nproc` - if [[ "$1" != "" ]]; then + if [ "$SYSTEM" == "Linux" ];then + parallel_number=`nproc` + else + parallel_number=8 + fi + if [ "$1" != "" ]; then parallel_number=$1 fi make clean make -j ${parallel_number} - make install -j `nproc` + make install -j ${parallel_number} }