[CMake] How to get started with the CMake Ninja backend on Linux and Windows?

Alan W. Irwin irwin at beluga.phys.uvic.ca
Thu Jul 19 01:33:35 EDT 2012


There has been a lot of traffic here concerning the CMake Ninja
backend for more than a year with some claims that that combination is
now working pretty well on all platforms.  Therefore, my curiosity has
been aroused even though I am fairly satisfied with the CMake Make
backend.  So I would like to try out CMake with the Ninja backend for
my favorite CMake-based software build (PLplot).

I have some newbie questions about the Ninja backend.

What versions of CMake and Ninja work well together on both the Linux
and the Windows platforms?  (My fundamental platform is Linux, but I
also sometimes test CMake-based builds on the Wine variant of
Windows.) Has Ninja been officially released so we can talk about an
official version for it or are there just git snapshots available?  If
the latter, I am not that familiar with git so could somebody give me
the appropriate git clone command to download the source, and also the
git command to let me know exactly what source snapshot version I am
working with?

Are there any Ninja caveats?  For example, does Ninja allow parallel
builds?  What are the Ninja strengths compared to Make?  I understand
that rebuilds with just a few (or no) files changed should be faster
with Ninja, but how about builds from scratch?

I know how to build CMake, but can somebody give concise build
instructions for Ninja?  For example, is there a CMake-based
build system for Ninja itself that works with the Make backend
for CMake?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list