[CMake] Why is Ninja generator disabled by default?

Claus Klein claus.klein at arcormail.de
Sun May 20 07:58:05 EDT 2012


Hi Bill,

thank you for that info.

Indeed, the only major issue I can see is the problem with broken  
CMakeLists.txt files.
http://public.kitware.com/Bug/view.php?id=13105
But the solution is quit simple: cmake must add the missing include  
rules.ninja to the generated build.ninja file.

You should know, many people do cross-compile on an UNIX like host  
(including macos), because it is mutch faster than Windows.

With mingw or ppc toolchains build with busybox it is quiet easy (and  
fast)

In these case, the ninja generator can double the build speed again!


It is so fast, that the time-stamp resolution with secs is not enough,  
I have situations, where I need the nsec resolution too while building!
I have provided a patch for ninja to used stat64() and a higher  
resolutions than secs.


So for me nina works quiet well on OSX with gcc (tested with macports  
gcc V4.x, V4.6, V4.7 and mingw).
The xcode IDE use a very old gcc, I would never use it!
As IDE I use Eclipse and NetBeens, it works well with ninja ( with a  
makefile stub or direct)


On Windows I use cygwin, mingw and gnu tools with Eclipse too, but I  
prefer a UNIX like development host.

So please, there is no reason to disable the ninja generator by default.


With regards,

Claus


p.s. try this script on an unix like system with this CMakeLists file  
to see what happens if the system is very fast.



On 18.05.2012, at 23:48, Bill Hoffman wrote:

> On 5/18/2012 5:37 PM, Claus Klein wrote:
>> Hi,
>>
>> I downloaded the newest version 2.8 of cmake for MACOS and dit not  
>> found
>> the new generator for ninja.
>>
>> So I downloaded the sources and build it myself.
>>
>> It seems to work fine and just 2 times faster than with make.
>>
>> Why is it disabled?
>
> See my post here:
> http://www.cmake.org/pipermail/cmake/2012-May/050304.html
>
> I assume you are on windows or Mac.
>
> So, if you are 2 times faster on windows it is because incremental  
> builds are totally broken (although I suspect it will still be  
> faster)...  On the mac, you would be ok as long as the project does  
> not create frameworks or app bundles.
>
> -Bill
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120520/33192ec3/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bootstrap.sh
Type: application/octet-stream
Size: 3023 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120520/33192ec3/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120520/33192ec3/attachment-0001.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CMakeLists.txt
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120520/33192ec3/attachment.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120520/33192ec3/attachment-0002.htm>


More information about the CMake mailing list