mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-07 14:50:15 -05:00
3a9d56d2c7
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
12 lines
422 B
CMake
12 lines
422 B
CMake
set_property(GLOBAL PROPERTY JOB_POOLS source_file_compile_pool=2 target_compile_pool=4 target_link_pool=1)
|
|
|
|
enable_language(C)
|
|
|
|
set_property(SOURCE hello.c PROPERTY JOB_POOL_COMPILE "source_file_compile_pool")
|
|
|
|
add_executable(hello hello.c)
|
|
set_property(TARGET hello PROPERTY JOB_POOL_COMPILE "target_compile_pool")
|
|
set_property(TARGET hello PROPERTY JOB_POOL_LINK "target_link_pool")
|
|
|
|
include(CheckNoPrefixSubDir.cmake)
|