Building multiple configs at the same time with the ninja multiconfig generator ?


when using the Makefile or single-config ninja generators, I can (have to) create separate build trees e.g. for Debug- and Release-build.
Once I have those separate build directories, I can build in them in parallel, by simply running make/ninja in those independent build directories.

Now, is this also possible with the multiconfig ninja generator, i.e. can I run ninja -f build.Debug and ninja -f build.Release at the same time (in separate shells), or will they interfer with each other, via some temporary files or something ?


I think CMAKE_DEFAULT_CONFIGS is what you want here.

Cc: @kyle.edwards

Not sure.
Let me rephrase my question.
With makefiles (or single config ninja), I can generate a e.g. a Debug buildtree and a Release buildtree, and have one shell open in each of those two, and can build them independently from each other, they don’t interfer.
Can I do the same with multiconfig ninja, i.e. open two shells, in the same directory, and run “ninja -f” in one shell and “ninja -f” in the other shell at the same time, so that they will build without interfering ?


No; they will both want to use .ninja_log and .ninja_deps.