[Bf-blender-cvs] [424e5be] master: Makefile support for using NPROCS as an env var
Campbell Barton
noreply at git.blender.org
Sun Jun 14 00:32:31 CEST 2015
Commit: 424e5be0467aad70bf249ca24b566f8a2d4e8c56
Author: Campbell Barton
Date: Sun Jun 14 08:26:33 2015 +1000
Branches: master
https://developer.blender.org/rB424e5be0467aad70bf249ca24b566f8a2d4e8c56
Makefile support for using NPROCS as an env var
===================================================================
M GNUmakefile
===================================================================
diff --git a/GNUmakefile b/GNUmakefile
index 80366af..d37d810 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -81,18 +81,20 @@ endif
# -----------------------------------------------------------------------------
# Get the number of cores for threaded build
-NPROCS:=1
-ifeq ($(OS), Linux)
- NPROCS:=$(shell nproc)
-endif
-ifeq ($(OS), Darwin)
- NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
-endif
-ifeq ($(OS), FreeBSD)
- NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
-endif
-ifeq ($(OS), NetBSD)
- NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+ifndef NPROCS
+ NPROCS:=1
+ ifeq ($(OS), Linux)
+ NPROCS:=$(shell nproc)
+ endif
+ ifeq ($(OS), Darwin)
+ NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
+ endif
+ ifeq ($(OS), FreeBSD)
+ NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+ endif
+ ifeq ($(OS), NetBSD)
+ NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
+ endif
endif
More information about the Bf-blender-cvs
mailing list