Found another place where nproc can be used

/proc/cpuinfo is a Linux-specific thing. Using GNU [[ http://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html | nproc ]] should be more portable.

Reviewers: mont29

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D377
This commit is contained in:
Lawrence D'Oliveiro 2014-03-02 10:28:42 +01:00 committed by Bastien Montagne
parent 6045de2bf5
commit 49e21f6978
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ endif
# Get the number of cores for threaded build
NPROCS:=1
ifeq ($(OS), Linux)
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
NPROCS:=$(shell nproc)
endif
ifeq ($(OS), Darwin)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3)