JOB_POOLS.rst 1.1 KB

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