Take a look at job pools which are implemented in ninja.
You should be able to setup 2 pools and put the expensive target in one
pool and the rest in the other, which should give you the desired behavior.
https://cmake.org/cmake/help/latest/prop_gbl/JOB_POOLS.html
https://ninja-build.org/manu
I have an issue that's really difficult to track down because it only seems
to repro on certain machines which don't have access to.
The sequence of events seems to be:
(1) Invoke cmake to generate ninja project. Success.
* Note that generated rules.ninja has .o compilation dependencies with
absol
My current project builds a bunch (30) different plugins that do NOT depend on
each other. One of those plugins has about 200 files of highly templated C++
code to build which takes a while to compile and link. Meanwhile the other
plugins only have about 20-40 files of "run-of-the-mill" c++ code