[CMake] FYI - From Ninja-build mailing list - Fwd: Proposal: restat rules

Peter Kuemmel syntheticpp at gmx.net
Thu Sep 29 19:36:49 EDT 2011


>
> Tested cmake/ninja with Blender's cmake files, works well, and fast!
> Single file rebuild is 0.97 sec, same on makefiles was 3.7sec.
> 

I also have some numbers:

----------------------------
Building LyX (lyx.org, 676 files):

LyX has autotools and cmake as build system.



* cmake generated ninja files:

1. build
cmake -G Ninja
time ninja
real 1m15.862s

2. dry run
ninja
real 0m0.113s

3. rebuild one file
touch ../trunk/src/LyX.cpp 
time ninja
real 0m7.340s



* cmake generated Makefiles:

1. build
cmake ../trunk
time make -j9
real 1m19.471s

2. dry run
time make -j9
real 0m1.457s

3. rebuild one file
touch ../trunk/src/LyX.cpp 
time make -j9
real 0m7.952s



* autotools:

1. build 
./configure --enable-build-type=dev (maybe different to cmake configuration)
time make -j9
real 3m19.988s

2. dry run
time make -j9
real 0m2.165s

3. rebuild one file
touch ../trunk/src/LyX.cpp 
time make -j9
real 0m13.087s




Summary:

         build    dry    rebuild
ninja   1m15.8   0m0.1    0m07.3
make    1m19.4   0m1.4    0m07.9
auto    3m19.9   0m2.1    0m13.0

So only the dry run shows a huge speedup (10-20 times faster)




-----------------------------------------------
And with a bigger project (clang, 1703 files):

        build    dry   
ninja  8m29.7   0m0.16
make   7m52.9   0m1.42

Also here the dry run is much faster.



Used sources:
cmake: git://github.com/pcc/CMake/tree/ninja-generator
ninja: git://github.com/pcc/ninja.git/tree/outputs-ready

-- 
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!		
Jetzt informieren: http://www.gmx.net/de/go/freephone


More information about the CMake mailing list