• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1JOB_POOLS
2---------
3
4Ninja only: List of available pools.
5
6A pool is a named integer property and defines the maximum number
7of concurrent jobs which can be started by a rule assigned to the pool.
8The :prop_gbl:`JOB_POOLS` property is a semicolon-separated list of
9pairs using the syntax NAME=integer (without a space after the equality sign).
10
11For instance:
12
13.. code-block:: cmake
14
15  set_property(GLOBAL PROPERTY JOB_POOLS two_jobs=2 ten_jobs=10)
16
17Defined pools could be used globally by setting
18:variable:`CMAKE_JOB_POOL_COMPILE` and :variable:`CMAKE_JOB_POOL_LINK`
19or per target by setting the target properties
20:prop_tgt:`JOB_POOL_COMPILE` and :prop_tgt:`JOB_POOL_LINK`.
21:command:`Custom commands <add_custom_command>` and
22:command:`custom targets <add_custom_target>` can specify pools using the
23option ``JOB_POOL``.
24Using a pool that is not defined by :prop_gbl:`JOB_POOLS` causes
25an error by ninja at build time.
26
27If not set, this property uses the value of the :variable:`CMAKE_JOB_POOLS`
28variable.
29
30Build targets provided by CMake that are meant for individual interactive
31use, such as ``install``, are placed in the ``console`` pool automatically.
32