C.3.2 num-comps-file, num-build-cpus, and compilation time
If the build system has multiple processors, you can split the build to share it out.
The value for
num-build-cpus sets the maximum number of groups of files to
split the build into. Have one group for each build system processor in order to fully use
each processor. This makes the build quicker. The value for
sets the maximum number of components per C++ file.
For example, if there are 40 components,
num-build-cpus is set to 4, and
num-comps-file is set to 25, then SimGen produces four groups of files,
each with 10 components. This is less than
num-comps-file, so each group
contains only one C++ file. So:
SimGen produces four C++ files.
Each C++ file has 10 components instead of the maximum value of 25.
Using only the
num-comps-file option to calculate the components per file would
result in two C++ files, with one file containing 25 components and the second file
containing 15. This split would only use two build system processors. Accurately setting
num-build-cpus allows SimGen to fully use all processors.