From 5d55af65ba800051d34d716748a1fb06bc9637fa Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 9 Feb 2014 00:17:38 -0500 Subject: [PATCH] Make build.sh a bit more robust. --- build.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index 72f6edd..5857d82 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash # # Need to install the following on Ubuntu 12.04: # - cmake @@ -7,5 +7,15 @@ # # If you find other deps, add them here -cmake -DCMAKE_BUILD_TYPE=Release . -make +NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l` +let NCPU=$NCPU+2 +echo "Will build with 'make -j$NCPU' ... please edit this script if incorrect." + +set -x +rm -rf cmake-build +mkdir -p cmake-build +cd $_ +cmake -DCMAKE_BUILD_TYPE=Release .. +make -j$NCPU && cp -a 1pass .. +cd .. +