cmake: update build instructions to recommend parallel build (faster) #4215
Labels
Doc: Optimization Site
Issue related to https://developers.google.com/optimization/ or Documentation in general
Feature Request
Missing Feature/Wrapper
Milestone
applies to: C++ / CP-SAT, Routing, Linear Solver. Tested on ARM 64 platform (Pi 5)
on some platforms the default cmake build is single threaded and does not expand to fill available cores. current versions of cmake accept a flag "--parallel " which passes platform-specific flags down to the compile steps.
multicore compilation can finish substantially faster. for example, a scratch build on the Pi 5 (ARM 64) building with "cmake --build build" runs on a single core and takes 134 minutes. Running "cmake --build build --parallel 4" runs on all four cores and takes 68 minutes.
recommended solution is to update the cmake build documentation file to inform about this option.
there is also a way to make multicore default, but that assumes all users will prefer it.
reference: https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-build-j
The text was updated successfully, but these errors were encountered: