-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs(BUILD): add -j $(nproc) #5288
base: develop
Are you sure you want to change the base?
Conversation
This improves build times.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5288 +/- ##
=======================================
Coverage 78.1% 78.2%
=======================================
Files 790 790
Lines 67638 67638
Branches 8164 8160 -4
=======================================
+ Hits 52859 52868 +9
+ Misses 14779 14770 -9 |
@@ -283,7 +283,7 @@ It fixes some source files to add missing `#include`s. | |||
Single-config generators: | |||
|
|||
``` | |||
cmake --build . | |||
cmake --build . -j $(nproc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine.
This sets the max of the underlying build tool. Unix Makefile defaults to 1 but will Ninja max your system out.
@@ -283,7 +283,7 @@ It fixes some source files to add missing `#include`s. | |||
Single-config generators: | |||
|
|||
``` | |||
cmake --build . | |||
cmake --build . -j $(nproc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nproc
is not available on macos.
Since BUILD.md mentions building on Linux/Windows/Mac, it would be helpful to include the commands for each.
I usually use sysctl -n hw.logicalcpu
on macos.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I forgot to mention that also.
brew install coreutils
will get you nproc
instead of that malarky.
High Level Overview of Change
This improves build times. I think the time is cut to about 1/6 for me - a big difference. I am not sure if there is a situation when it should not be used.
Context of Change
BUILD instructions
Type of Change
.gitignore
, formatting, dropping support for older tooling)