MisterTea / homebrew-et

Homebrew formula for Eternal Terminal
6 stars 9 forks source link

Build concurrency is hard-coded to -j4, instead of using all processors #21

Closed meermanr closed 1 year ago

meermanr commented 2 years ago

Minor nuisance, but I noticed that running

brew install MisterTea/et/et

would seemingly "stall" after logging:

==> Installing mistertea/et/et
==> cmake . -DDISABLE_VCPKG:BOOL=ON -DPYTHON_EXECUTABLE=/usr/bin/python3
==> make -j4 install

... because it was only using 4 threads of compilation. I was suspicious that it was stuck because there was no further output and my CPU monitoring didn't show high usage.

Can I suggest using $(nproc) to detect how many threads are available, and then building with that number?

On my system, MacBook Pro 16" (Intel) late-2018, nproc returns 16.

My Ruby skills are rubbish or I'd be brave enough to draft a pull request...

MisterTea commented 2 years ago

Please submit a PR. Even with your rubbish ruby skills I'm sure you can replace 4 with nproc :-)

carlocab commented 1 year ago

You can actually just omit the -j flag entirely. brew adds the appropriate -j flag to MAKEFLAGS during the build. By default, this is the number of available processors, but users can customise this with HOMEBREW_MAKE_JOBS.