mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 03:43:35 +08:00
Support parallel building through -j flag in makefile.
This commit is contained in:
@@ -54,13 +54,14 @@
|
|||||||
# rest are arguments to pass to the makefile generated
|
# rest are arguments to pass to the makefile generated
|
||||||
# by cmake in the subdirectory
|
# by cmake in the subdirectory
|
||||||
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
||||||
|
j ?= 1
|
||||||
|
|
||||||
# Functions
|
# Functions
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
# define a make function to describe how to build a cmake config
|
# define a make function to describe how to build a cmake config
|
||||||
define cmake-build
|
define cmake-build
|
||||||
mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -DCONFIG=$(1)
|
+mkdir -p $(PWD)/build_$@ && cd $(PWD)/build_$@ && cmake .. -DCONFIG=$(1)
|
||||||
make -C $(PWD)/build_$@ -s $(ARGS)
|
+make -C $(PWD)/build_$@ --no-print-directory $(ARGS)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user