cmake --build / ctest_build: support "-l <load>" parallel make option
At least GNU make and ninja support a -l
option which limit number of parallel jobs based on system load. E.g. make:
-l [load], --load-average[=load] Specifies that no new jobs (commands) should be started if there are others jobs running and the load average is at least load (a floating-point number). With no argument, removes a previous load limit.
or ninja
-l N do not start new jobs if the load average is greater than N
This option is very useful when there are started several independent builds.
Please add something which is similar to CMAKE_BUILD_PARALLEL_LEVEL