# serial custom\_commands?

**URL:** <https://discourse.cmake.org/t/serial-custom-commands/7821>\
**Category:** Usage\
**Created:** [April 4, 2023, 6:21am UTC](https://discourse.cmake.org/t/serial-custom-commands/7821 "2023-04-04T06:21:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KUGA2](https://discourse.cmake.org/user_avatar/discourse.cmake.org/kuga2/32/4968_2.png) [@KUGA2](https://discourse.cmake.org/u/KUGA2)\
**Post date:** [April 4, 2023, 6:21am UTC](https://discourse.cmake.org/t/serial-custom-commands/7821/1 "2023-04-04T06:21:46Z")

</div>

We have a build that sometimes fails, because a executable for a custom command is already in use.  
How can I make it run serial and never in parallel. Much like RUN\_SERIAL for tests.

---

<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:** [April 24, 2023, 4:14am UTC](https://discourse.cmake.org/t/serial-custom-commands/7821/2 "2023-04-24T04:14:45Z")

</div>

It sounds like the custom command needs to depend on the executable. That should serialize it with the executable’s link step (which is what I assume is being contended with here).
