[CMake] cmake + ninja how to use several CPU cores?

Dave Milter davemilter at gmail.com
Mon Jul 29 15:22:35 EDT 2019


On Mon, Jul 29, 2019 at 8:24 PM Brad King <brad.king at kitware.com> wrote:
>
> CMake 3.9 made this much better than it used to be:
>
>   https://gitlab.kitware.com/cmake/cmake/merge_requests/430
>
> Since then all objects in a target can start compiling independently
> so long as that target does not depend on any targets with custom
> commands.

Is any way to tell cmake that add_custom_command is have no side effect,
and OUTPUT is exactly what it produces?

I see that there is
Tests/RunCMake/Ninja/LooseObjectDepends.cmake

in https://gitlab.kitware.com/cmake/cmake/merge_requests/430

is it negative test, or there is chance for fast compilation?


More information about the CMake mailing list