Found another place where nproc can be used
authorLawrence D'Oliveiro <from-blender@geek-central.gen.nz>
Sun, 2 Mar 2014 09:28:42 +0000 (10:28 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Sun, 2 Mar 2014 09:29:40 +0000 (10:29 +0100)
/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

GNUmakefile

index 8ae2efbe53c9566ccab544e04e275c8fba3b9eca..566a44b500f6781b6bfb3ee5d39565ba0ba9a3a0 100644 (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)