# How to set job pool for step targets defined by ExternalProject\_Add\_StepTargets

**URL:** https://discourse.cmake.org/t/how-to-set-job-pool-for-step-targets-defined-by-externalproject-add-steptargets/9483
**Category:** Code
**Created:** [November 22, 2023, 11:24am UTC](https://discourse.cmake.org/t/how-to-set-job-pool-for-step-targets-defined-by-externalproject-add-steptargets/9483 "2023-11-22T11:24:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hehaoqian1](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hehaoqian1/32/4007_2.png) [@hehaoqian1](https://discourse.cmake.org/u/hehaoqian1)
#### Post date: [November 22, 2023, 11:24am UTC](https://discourse.cmake.org/t/how-to-set-job-pool-for-step-targets-defined-by-externalproject-add-steptargets/9483/1 "2023-11-22T11:24:50Z")

</div>

As the doc of cmake property `JOB_POOLS` says

Defined pools could be used globally by setting `CMAKE_JOB_POOL_COMPILE` and `CMAKE_JOB_POOL_LINK`or per target by setting the target properties `JOB_POOL_COMPILE`and `JOB_POOL_LINK` . `Custom commands` and `custom targets` can specify pools using the option `JOB_POOL` . Using a pool that is not defined by `JOB_POOLS` causes an error by ninja at build time.

But I find no way to set it for step targets of external project.

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [November 22, 2023, 2:23pm UTC](https://discourse.cmake.org/t/how-to-set-job-pool-for-step-targets-defined-by-externalproject-add-steptargets/9483/2 "2023-11-22T14:23:49Z")

</div>

It looks like there’s no way to control `JOB_POOL` for the inner `add_custom_command`. That seems worth [a feature request](https://gitlab.kitware.com/cmake/cmake/-/issues).

FYI: @craig.scott
