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

Nicolas Desprès nicolas.despres at gmail.com
Thu Jul 19 05:00:28 EDT 2012


On Thu, Jul 19, 2012 at 10:27 AM, Alan W. Irwin
<irwin at beluga.phys.uvic.ca>wrote:

> 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<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<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<http://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<http://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?


As far as I know the last official release of CMake supports Ninja backend
for both Linux and Windows. Martine's Ninja is the official repository.
Although I am sure it works for Linux, I cannot guaranty it for Windows but
I am almost sure. Try it :-)

-- 
Nicolas Desprès
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120719/8d1ab1a3/attachment.htm>


More information about the CMake mailing list