From 079a57d4c0e6989e26d77b7a22549c6fd49dc344 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 20 Sep 2019 14:43:48 +0200 Subject: [PATCH] macOS snapshot: build using `make -j$(nproc)` as it's more efficient than `make -j` --- macOS/build.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/macOS/build.sh b/macOS/build.sh index 935dc641d..68532bddc 100755 --- a/macOS/build.sh +++ b/macOS/build.sh @@ -2,6 +2,9 @@ set -ex +# Set the number of threads +NTHREADS=$(nproc) + ## ## Clone Dynare ## @@ -22,9 +25,8 @@ fi cd "$ROOTDIR" [[ -f configure ]] || autoreconf -si CC=gcc-9 CXX=g++-9 ./configure --with-matlab=/Applications/MATLAB_R2016b.app MATLAB_VERSION=R2016b --with-matio=/usr/local --with-gsl=/usr/local --with-slicot=/usr/local --disable-octave PACKAGE_VERSION="$VERSION" PACKAGE_STRING="dynare $VERSION" -make -j -make -j pdf -make -j html + make -j"$NTHREADS" pdf html +make -j"$NTHREADS" ## @@ -73,7 +75,7 @@ cp "$ROOTDIR"/dynare++/src/dynare++ "$PKGFILES" cd "$ROOTDIR"/mex/build/matlab make clean CC=gcc-9 CXX=g++-9 ./configure --with-matlab=/Applications/MATLAB_R2019b.app MATLAB_VERSION=R2019b --with-matio=/usr/local --with-gsl=/usr/local --with-slicot=/usr/local PACKAGE_VERSION="$VERSION" PACKAGE_STRING="dynare $VERSION" -make -j +make -j"$NTHREADS" cd "$ROOTDIR"/macOS cp -L "$ROOTDIR"/mex/matlab/* "$PKGFILES"/mex/matlab/maci64-9.4-9.7