[Bf-blender-cvs] [49e21f6] master: Found another place where nproc can be used
Lawrence D'Oliveiro
noreply at git.blender.org
Sun Mar 2 10:30:29 CET 2014
Commit: 49e21f697840f8ab12b1d2c7e8be51b055bcbce3
Author: Lawrence D'Oliveiro
Date: Sun Mar 2 10:28:42 2014 +0100
https://developer.blender.org/rB49e21f697840f8ab12b1d2c7e8be51b055bcbce3
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
===================================================================
M GNUmakefile
===================================================================
diff --git a/GNUmakefile b/GNUmakefile
index 8ae2efb..566a44b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -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)
More information about the Bf-blender-cvs
mailing list