cmake/Help/prop_gbl/JOB_POOLS.rst

32 lines
1.1 KiB
ReStructuredText
Raw Normal View History

2014-08-03 19:52:23 +02:00
JOB_POOLS
---------
Ninja only: List of available pools.
A pool is a named integer property and defines the maximum number
of concurrent jobs which can be started by a rule assigned to the pool.
2023-05-23 16:38:00 +02:00
The ``JOB_POOLS`` property is a semicolon-separated list of
pairs using the syntax ``NAME=integer`` (without a space after the equality sign).
2014-08-03 19:52:23 +02:00
For instance:
.. code-block:: cmake
set_property(GLOBAL PROPERTY JOB_POOLS two_jobs=2 ten_jobs=10)
Defined pools could be used globally by setting
:variable:`CMAKE_JOB_POOL_COMPILE` and :variable:`CMAKE_JOB_POOL_LINK`
or per target by setting the target properties
:prop_tgt:`JOB_POOL_COMPILE` and :prop_tgt:`JOB_POOL_LINK`.
2019-11-11 23:01:05 +01:00
:command:`Custom commands <add_custom_command>` and
:command:`custom targets <add_custom_target>` can specify pools using the
option ``JOB_POOL``.
2023-05-23 16:38:00 +02:00
Using a pool that is not defined by ``JOB_POOLS`` causes
2019-11-11 23:01:05 +01:00
an error by ninja at build time.
2015-04-27 22:25:09 +02:00
2018-04-23 21:13:27 +02:00
If not set, this property uses the value of the :variable:`CMAKE_JOB_POOLS`
variable.
2015-04-27 22:25:09 +02:00
Build targets provided by CMake that are meant for individual interactive
use, such as ``install``, are placed in the ``console`` pool automatically.