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

Dave Milter davemilter at gmail.com
Mon Jul 29 11:50:01 EDT 2019


On Mon, Jul 29, 2019 at 1:48 PM Bruce Stephens
<bruce.r.stephens at gmail.com> wrote:
>
> I think it's reasonable for CMake/Ninja to require the headers be
> generated, especially since main.cpp does include one of them (though
> CMake/Ninja doesn't know that until later). lib/lib1.cpp is more
> arguable, but I imagine there's no real distinction made: main.cpp.o
> depends on all the dependencies of the libraries.
>

In my initial example headers files are not generated in cmake scripts.
Only source code are generated, so main.cpp -> main.cpp.o doesn't
depend on anything.
But generated by cmake build.ninja still require link of extern_lib
before starting  main.cpp -> main.cpp.o


More information about the CMake mailing list