#29 Enable parallel processing by default

Closed
opened 4 years ago by sumpfralle · 1 comments

The following snippet should enable parallel processing (based on the number of available processors by default)

# determine number of parallel jobs automatically, if not specified via "-j"
ifneq "$(findstring -j,$(MAKEFLAGS)))" ""
        MAX_PARALLEL_JOBS ?= $(shell { nproc || getconf "_NPROCESSORS_ONLN" || echo "1"; } 2>/dev/null)
        ifneq "$(MAX_PARALLEL_JOBS)" ""
                MAKEFLAGS += --jobs=$(MAX_PARALLEL_JOBS)
                # # group output by target (no interleaving of output from different targets)
                ifneq "$(findstring -O,$(MAKEFLAGS)))" ""
                        MAKEFLAGS += --output-sync 
                endif
        endif
endif
The following snippet should enable parallel processing (based on the number of available processors by default) ```make # determine number of parallel jobs automatically, if not specified via "-j" ifneq "$(findstring -j,$(MAKEFLAGS)))" "" MAX_PARALLEL_JOBS ?= $(shell { nproc || getconf "_NPROCESSORS_ONLN" || echo "1"; } 2>/dev/null) ifneq "$(MAX_PARALLEL_JOBS)" "" MAKEFLAGS += --jobs=$(MAX_PARALLEL_JOBS) # # group output by target (no interleaving of output from different targets) ifneq "$(findstring -O,$(MAKEFLAGS)))" "" MAKEFLAGS += --output-sync endif endif endif ```
sumpfralle commented 3 years ago
Owner

fixed in a5c77b35cd

fixed in a5c77b35cd405446ef2ba7f6e0db0749b2ac135c
Sign in to join this conversation.
No Label
No Milestone
No assignee
1 Participants
Loading...
Cancel
Save
There is no content yet.