Browse Source

build: Inherit -n and -jN flags if Ninja #12219

pull/12240/head
Eisuke Kawashima 12 months ago
committed by GitHub
parent
commit
250e4e699f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      Makefile

+ 7
- 3
Makefile View File

@ -58,11 +58,15 @@ endif
BUILD_CMD = $(BUILD_TOOL)
ifneq ($(VERBOSE),)
# Only need to handle Ninja here. Make will inherit the VERBOSE variable.
ifeq ($(BUILD_TYPE),Ninja)
# Only need to handle Ninja here. Make will inherit the VERBOSE variable, and the -j and -n flags.
ifeq ($(BUILD_TYPE),Ninja)
ifneq ($(VERBOSE),)
BUILD_CMD += -v
endif
BUILD_CMD += $(shell printf '%s' '$(MAKEFLAGS)' | grep -o -- '-j[0-9]\+')
ifeq (n,$(findstring n,$(firstword -$(MAKEFLAGS))))
BUILD_CMD += -n
endif
endif
DEPS_CMAKE_FLAGS ?=


Loading…
Cancel
Save