[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 04:27:46 EDT 2012


On 2012-07-19 09:04+0200 Nicolas Desprès wrote:

> On Thu, Jul 19, 2012 at 7:33 AM, Alan W. Irwin <irwin at beluga.phys.uvic.ca>wrote:
>
>> 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?
>>
>
> See http://www.cmake.org/Wiki/CMake/Git
>
>>
>> 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?
>>
>
> See http://martine.github.com/ninja/manual.html
>
>
>>
>> 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?
>>
>
> Follow the instruction in the HACKING file there git://
> github.com/martine/ninja.git
>
> There are also CMake based build-system in some of the fork of this
> project. Here is one of them: git://github.com/syntheticpp/ninja.git
>

Thanks, Nicolas, for the useful general background information on git
and Ninja, but I also need some specifics.  For example, does the
version of Ninja at git://github.com/martine/ninja.git work well as a
backend for CMake for _both_ Linux and Windows?  If so, what minimum
version of CMake is required?

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