Ninja: Parallel Installation Option
Currently, there is no way to run the install step for a CMake project in parallel. This can result in long install times for some projects.
The Ninja generator creates sub/dir/install/local
targets which install a particular directory without installing its subdirectories. For a project that does not rely on a global state modified by the install code, these targets can be executed simultaneously to fully parallelize the installation.
There are two things needed to make this possible:
- Create an additional target (
install/local/all
?) which depends all other../install/local
targets. - Add an option (
CMAKE_INSTALL_LOCAL_PARALLEL
?) to remove the console pool from the../install/local
targets so that they can run in parallel.