Skip to content
Snippets Groups Projects
Commit 424e5be0 authored by Campbell Barton's avatar Campbell Barton
Browse files

Makefile support for using NPROCS as an env var

parent a2d4c26a
No related branches found
No related tags found
No related merge requests found
...@@ -81,6 +81,7 @@ endif ...@@ -81,6 +81,7 @@ endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
# Get the number of cores for threaded build # Get the number of cores for threaded build
ifndef NPROCS
NPROCS:=1 NPROCS:=1
ifeq ($(OS), Linux) ifeq ($(OS), Linux)
NPROCS:=$(shell nproc) NPROCS:=$(shell nproc)
...@@ -94,6 +95,7 @@ endif ...@@ -94,6 +95,7 @@ endif
ifeq ($(OS), NetBSD) ifeq ($(OS), NetBSD)
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 ) NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
endif endif
endif
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment