[Cmake-commits] CMake branch, master, updated. v3.10.0-503-g5f87ea1

Kitware Robot kwrobot at kitware.com
Mon Dec 4 10:45:08 EST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  5f87ea160378265c70c97d1f627c23e6faf02378 (commit)
       via  07185055d57f28347a1850a1f06787ac93f20afd (commit)
      from  7f881d159ceb2de70f7d648ad3c113ce18d1a3a7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5f87ea160378265c70c97d1f627c23e6faf02378
commit 5f87ea160378265c70c97d1f627c23e6faf02378
Merge: 7f881d1 0718505
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Dec 4 15:38:43 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Mon Dec 4 10:38:51 2017 -0500

    Merge topic 'cmake-job-pool'
    
    07185055 Ninja: add CMAKE_JOB_POOLS variable as default for JOBS_POOLS
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1514


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=07185055d57f28347a1850a1f06787ac93f20afd
commit 07185055d57f28347a1850a1f06787ac93f20afd
Author:     Matt McCormick <matt.mccormick at kitware.com>
AuthorDate: Mon Nov 20 16:49:41 2017 -0500
Commit:     Matt McCormick <matt.mccormick at kitware.com>
CommitDate: Wed Nov 29 15:13:36 2017 -0500

    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

diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 0451466..0938253 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -50,6 +50,7 @@ Variables that Provide Information
    /variable/CMAKE_IMPORT_LIBRARY_SUFFIX
    /variable/CMAKE_JOB_POOL_COMPILE
    /variable/CMAKE_JOB_POOL_LINK
+   /variable/CMAKE_JOB_POOLS
    /variable/CMAKE_LANG_COMPILER_AR
    /variable/CMAKE_LANG_COMPILER_RANLIB
    /variable/CMAKE_LINK_LIBRARY_SUFFIX
diff --git a/Help/prop_gbl/JOB_POOLS.rst b/Help/prop_gbl/JOB_POOLS.rst
index 2ce74b8..b904f7a 100644
--- a/Help/prop_gbl/JOB_POOLS.rst
+++ b/Help/prop_gbl/JOB_POOLS.rst
@@ -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`
+variable.
+
 Build targets provided by CMake that are meant for individual interactive
 use, such as ``install``, are placed in the ``console`` pool automatically.
diff --git a/Help/release/dev/cmake-job-pool.rst b/Help/release/dev/cmake-job-pool.rst
new file mode 100644
index 0000000..836d9c1
--- /dev/null
+++ b/Help/release/dev/cmake-job-pool.rst
@@ -0,0 +1,7 @@
+cmake-job-pool
+--------------
+
+* 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
+  generator.
diff --git a/Help/variable/CMAKE_JOB_POOLS.rst b/Help/variable/CMAKE_JOB_POOLS.rst
new file mode 100644
index 0000000..72b50b4
--- /dev/null
+++ b/Help/variable/CMAKE_JOB_POOLS.rst
@@ -0,0 +1,6 @@
+CMAKE_JOB_POOLS
+---------------
+
+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.
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 477ce51..2d969d2 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");

-----------------------------------------------------------------------

Summary of changes:
 Help/manual/cmake-variables.7.rst   |    1 +
 Help/prop_gbl/JOB_POOLS.rst         |    3 +++
 Help/release/dev/cmake-job-pool.rst |    7 +++++++
 Help/variable/CMAKE_JOB_POOLS.rst   |    6 ++++++
 Source/cmLocalNinjaGenerator.cxx    |    3 +++
 5 files changed, 20 insertions(+)
 create mode 100644 Help/release/dev/cmake-job-pool.rst
 create mode 100644 Help/variable/CMAKE_JOB_POOLS.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list