# How to use FASTBuild with multiple targets?

**URL:** https://discourse.cmake.org/t/how-to-use-fastbuild-with-multiple-targets/15822
**Category:** Usage
**Tags:** gen:fastbuild
**Created:** [September 4, 2026, 4:25pm UTC](https://discourse.cmake.org/t/how-to-use-fastbuild-with-multiple-targets/15822 "2026-09-04T16:25:59Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![CsatiZoltan](https://discourse.cmake.org/user_avatar/discourse.cmake.org/csatizoltan/32/5488_2.png) [@CsatiZoltan](https://discourse.cmake.org/u/CsatiZoltan)
#### Post date: [September 4, 2026, 4:25pm UTC](https://discourse.cmake.org/t/how-to-use-fastbuild-with-multiple-targets/15822/1 "2026-09-04T16:25:59Z")

</div>

I tried out the FASTBuild generator with CMake (FASTBuild v1.20 with CMake 4.3.2). My project has multiple targets, which I build with

```sh
cmake --build build/

```

By default, CMake builds all the targets, which causes an error in FASTBuild:

```auto
FBuild: Error: Another instance of FASTBuild is already running in ...

```

I see two options:

1. Build the targets one by one. It works, but there should be an automation so that I do not have to type explicitly.
2. Pass the [-wait flag](https://www.fastbuild.org/docs/options.html#wait) to FASTBuild from CMake. Is it possible?

However, in your [blog post](https://www.kitware.com/cmake-fastbuild-distributed-cached-and-fast/), you didn’t mention this problem, you also used `cmake --build` without specified targets.

PS: Perhaps you could create a tag `gen:fastbuild` on the CMake Discourse.

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [September 4, 2026, 10:51pm UTC](https://discourse.cmake.org/t/how-to-use-fastbuild-with-multiple-targets/15822/2 "2026-09-04T22:51:05Z")

</div>

I updated your post to add the `gen:fastbuild` tag.
