mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
changed: default to use one build thread per core on system, not a hardcoded 4
relies on nproc being available
This commit is contained in:
@@ -43,7 +43,18 @@ SCRIPT_PATH=`getAbsPath "$SCRIPT_PATH"`
|
||||
#Get options
|
||||
OPM_DATA=
|
||||
WORKSPACE="$SCRIPT_PATH/.."
|
||||
BUILDTHREADS=4
|
||||
|
||||
if [ "$OSTYPE" == "linux-gnu" ]
|
||||
then
|
||||
if which nproc > /dev/null
|
||||
then
|
||||
BUILDTHREADS=`nproc`
|
||||
fi
|
||||
else # OSX
|
||||
BUILDTHREADS=`sysctl hw.ncpu | awk -F ' ' '{print $1}'`
|
||||
fi
|
||||
test -z "$BUILDTHREADS" && BUILDTHREADS=1
|
||||
|
||||
PULL_REQUESTS=
|
||||
[ $# -eq 0 ] && usage
|
||||
while getopts "d:w:p:t:h" arg; do
|
||||
|
||||
Reference in New Issue
Block a user