using ninja instead of make

Clemens Lang cal at
Thu Jan 1 13:38:32 PST 2015


----- On 1 Jan, 2015, at 18:42, René J.V. Bertin rjvbertin at wrote:

> I wonder, has anyone tried to use ninja instead of make for building ports? I
> keep hearing it's orders of magnitudes faster, though that might be true mostly
> for incremental builds.

Unless you have a way to generate the necessary configuration files from Makefiles,
ninja can only ever be used by ports that use a configure step that supports ninja.
The only configuration system (of relevant size and adoption) that falls into this
category is CMake. We could use ninja instead of make for all CMake ports, but
that would add another dependency, and unless I see some numbers and measurements
I'm outright going to question that it is considerably faster (especially not
orders of magnitude faster) than make when build times are largely dominated by
the compile times itself, rather than the execution time of the build tool.

> Still, any performance gain could be of interest for larger ports, or even huge
> ones such as calligra I'm currently trying out ...

Please do some measurements. As I said, I doubt there will be considerable
improvement when building from scratch where the build time is dominated by the
components' compile times.

> How would one set things up for this?

Modify the CMake PortGroup to use ninja.

Clemens Lang

More information about the macports-dev mailing list