From 052b0448731cde947f8201daea91eae62442237a Mon Sep 17 00:00:00 2001 From: tianshuo78520a <707759223@qq.com> Date: Fri, 28 Jun 2019 16:15:16 +0800 Subject: [PATCH] Fix mac build nproc command not found (#18362) * change nproc 8 --- 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 6fe299cadc..46627b8b98 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