Skip to content
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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

docs(BUILD): add -j $(nproc) #5288

wants to merge 2 commits into from

Conversation

intelliot
Copy link
Collaborator

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (non-breaking change that only restructures code)
  • Performance (increase or change in throughput and/or latency)
  • Tests (you added tests for code that already exists, or your new feature included in this PR)
  • Documentation update
  • Chore (no impact to binary, e.g. .gitignore, formatting, dropping support for older tooling)
  • Release

This improves build times.
Copy link

codecov bot commented Feb 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.2%. Comparing base (e8e7888) to head (51aad4b).

Additional details and impacted files

Impacted file tree graph

@@           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     

see 3 files with indirect coverage changes

Impacted file tree graph

@@ -283,7 +283,7 @@ It fixes some source files to add missing `#include`s.
Single-config generators:

```
cmake --build .
cmake --build . -j $(nproc)
Copy link
Collaborator

@legleux legleux Feb 13, 2025

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.

@bthomee bthomee added the Trivial Simple change with minimal effect, or already tested. Only needs one approval. label Feb 13, 2025
@@ -283,7 +283,7 @@ It fixes some source files to add missing `#include`s.
Single-config generators:

```
cmake --build .
cmake --build . -j $(nproc)
Copy link
Contributor

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.

Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Trivial Simple change with minimal effect, or already tested. Only needs one approval.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants