Support job pools in custom commands and targets
To my knowledge this was raised in https://cmake.org/pipermail/cmake-developers/2016-November/029632.html
Quoting @brad.king there:
We currently have no interface to assign custom commands or custom targets to any pool, simply because no one implemented such support. It would have to be a new optional argument to the add_custom_command and add_custom_target commands. Brad
I faced this when wrapping python in ITK: https://github.com/InsightSoftwareConsortium/ITK/blob/master/Wrapping/Generators/Python/CMakeLists.txt#L305-L334
I am using the ninja from kitware that supports job pools, and it works flawlessly with the options:
'-DCMAKE_JOB_POOLS:STRING=compile=4;link=3' \
-DCMAKE_JOB_POOL_COMPILE:STRING=compile \
-DCMAKE_JOB_POOL_LINK:STRING=link
It would be nice to support custom command as well.