Skip to content

Commit

Permalink
Fix #14: How to parallelize builds with make
Browse files Browse the repository at this point in the history
  • Loading branch information
rwols committed Jan 23, 2021
1 parent 8882aff commit b04e4db
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,16 @@ All commands are also visible in the Tools menu under "CMakeBuilder".
If you have unit tests configured with the [add_test][2] function of CMake, then
you can run those with the "ctest" build variant.

### Using multiple cores with `make`
This package invokes `cmake --build` to build your targets. If you are using the
"Unix Makefiles" generator (`make`), and you want to use multiple cores, then
you have a few options:

- Don't use `make`, instead use `ninja`.
- Put `"env": {"CMAKE_BUILD_PARALLEL_LEVEL": 8}` as an environment variable in
the `"cmake"` configuration.
- Export a `MAKEFLAGS` variable in your .bashrc.

### Syntax highlighting for various generators
There is syntax highlighting when building a target, and a suitable line regex
is set up for each generator so that you can press F4 to go to an error.
Expand Down

0 comments on commit b04e4db

Please sign in to comment.