From 0a8b69fc7a981d8ecabc963dc0ef7b4970055655 Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Sat, 29 Jun 2019 09:48:00 +0800 Subject: [PATCH] Fix mac build nproc command not found in release1.5 (#18402) * fix mac build error * test=develop * fix * change nproc 8 * test=release/1.5 --- paddle/scripts/paddle_build.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 1c35665d71..9511234347 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} } -- GitLab