Files
CMake/Help/prop_sf/JOB_POOL_COMPILE.rst
Bastien Montagne 3a9d56d2c7 Ninja: Add support for per-source JOB_POOL_COMPILE property
This commit allows to override a global or target-wide 'job pool'
property on a per-source basis.

It modifies the Ninja generator to first look into the source's
properties, and only use the target properties as a fallback.

The new `source` parameter to
`cmNinjaTargetGenerator::addPoolNinjaVariable` may be null, e.g. when
the function is called in context where there is no source (e.g. a
linking task).

Closes: #23994
2025-07-16 21:16:24 +02:00

20 lines
493 B
ReStructuredText

JOB_POOL_COMPILE
----------------
Ninja only: Pool used for compiling.
The number of parallel compile processes could be limited by defining
pools with the global :prop_gbl:`JOB_POOLS`
property and then specifying here the pool name.
This allows to override the :prop_tgt:`JOB_POOL_COMPILE`
value for specific source files within a same target.
For instance:
.. code-block:: cmake
set_property(SOURCE main.cc PROPERTY JOB_POOL_COMPILE two_jobs)
This property is undefined by default.