Commit 07185055 authored by Matt McCormick's avatar Matt McCormick

Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLS

This enables configuration of build parallelism with the Ninja generator by
passing arguments on the command line to CMake. For example,

  cmake \
    '-DCMAKE_JOB_POOLS:STRING=compile=5;link=2' \
parent 4d52b46c
......@@ -50,6 +50,7 @@ Variables that Provide Information
......@@ -19,5 +19,8 @@ Defined pools could be used globally by setting
or per target by setting the target properties
:prop_tgt:`JOB_POOL_COMPILE` and :prop_tgt:`JOB_POOL_LINK`.
If not set, this property uses the value of the :variable:`CMAKE_JOB_POOLS`
Build targets provided by CMake that are meant for individual interactive
use, such as ``install``, are placed in the ``console`` pool automatically.
* A :variable:`CMAKE_JOB_POOLS` variable was added specify a value to use for
the :prop_gbl:`JOB_POOLS` property. This enables control over build
parallelism with command line configuration parameters when using the Ninja
If the :prop_gbl:`JOB_POOLS` global property is not set, the value
of this variable is used in its place. See :prop_gbl:`JOB_POOLS`
for additional information.
......@@ -207,6 +207,9 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os)
const char* jobpools =
if (!jobpools) {
jobpools = this->GetMakefile()->GetDefinition("CMAKE_JOB_POOLS");
if (jobpools) {
os, "Pools defined by global property JOB_POOLS");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment