How to use FASTBuild with multiple targets?

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

cmake --build build/

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

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 to FASTBuild from CMake. Is it possible?

However, in your blog post, 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.

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