Skip to content

cmake: update build instructions to recommend parallel build (faster) #4215

Open
@jjacobsohn

Description

@jjacobsohn

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

Metadata

Metadata

Assignees

Labels

Doc: Optimization SiteIssue related to https://developers.google.com/optimization/ or Documentation in generalFeature RequestMissing Feature/Wrapper

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions