From 86951aff9a2a919e90a97e8643ca4e73cc0bb42d Mon Sep 17 00:00:00 2001 From: Jonathan Li Date: Thu, 27 Oct 2016 19:11:37 +0000 Subject: [PATCH] build.sh: Fix for FreeBSD "--jobs" isn't present in FreeBSD's make, but "-j" is. --- build.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index 8a9e4e4d83..43280d586f 100755 --- a/build.sh +++ b/build.sh @@ -44,6 +44,8 @@ if [ "$(uname -s)" = 'Darwin' ]; then echo "Using Mavericks build with C++11 support." toolfile=cmake/darwin13-compiler-i386-clang.cmake fi +elif [ "$(uname -s)" = 'FreeBSD' ]; then + ncpu="$(sysctl -n hw.ncpu)" else ncpu=$(grep -w -c processor /proc/cpuinfo) toolfile=cmake/linux-compiler-i386-multilib.cmake @@ -53,7 +55,7 @@ if command -v ninja >/dev/null ; then flags="$flags -GNinja" make=ninja else - make="make --jobs=$ncpu" + make="make -j$ncpu" fi for ARG in "$@"; do