guayadeque icon indicating copy to clipboard operation
guayadeque copied to clipboard

Suggestion: Enable parallel builds with make -j NUMBER in build

Open sluedecke opened this issue 5 years ago • 1 comments

On my machine the provided build file compiles a lot faster when I add -j 4 to the make command.

In general one could add -j `nproc` :

./buildt
rm CMakeCache.txt
cmake . \
 -DCMAKE_BUILD_TYPE='Release' \
 -DCMAKE_INSTALL_PREFIX=/usr \
 -DCMAKE_CXX_STANDARD="11" \
 && make -j `nproc`

But I have an SSD and a nice CPU as well (https://stackoverflow.com/questions/2499070/gnu-make-should-the-number-of-jobs-equal-the-number-of-cpu-cores-in-a-system)

sluedecke avatar Jun 07 '20 19:06 sluedecke

I would rather use the system environment variable MAKEFLAGS to set such a flag. E.g. in Arch Linux you have the /etc/makepkg.conf to set it.

Strubbl avatar Jun 09 '20 11:06 Strubbl