diff options
author | Matt McCormick <matt.mccormick@kitware.com> | 2017-11-20 16:49:41 -0500 |
---|---|---|
committer | Matt McCormick <matt.mccormick@kitware.com> | 2017-11-29 15:13:36 -0500 |
commit | 07185055d57f28347a1850a1f06787ac93f20afd (patch) | |
tree | 76602531d090c97c8644602ea971e1de5699454c /Source/cmLocalNinjaGenerator.cxx | |
parent | 4d52b46c7046a23948221d4142d768b9ff834e33 (diff) | |
download | cmake-07185055d57f28347a1850a1f06787ac93f20afd.tar.gz |
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' \
-DCMAKE_JOB_POOL_COMPILE:STRING=compile \
-DCMAKE_JOB_POOL_LINK:STRING=link \
~/src/MyProject
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 477ce51f05..2d969d2f5e 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -207,6 +207,9 @@ void cmLocalNinjaGenerator::WritePools(std::ostream& os) const char* jobpools = this->GetCMakeInstance()->GetState()->GetGlobalProperty("JOB_POOLS"); + if (!jobpools) { + jobpools = this->GetMakefile()->GetDefinition("CMAKE_JOB_POOLS"); + } if (jobpools) { cmGlobalNinjaGenerator::WriteComment( os, "Pools defined by global property JOB_POOLS"); |