Ninja and KDevelop
Aleix Pol
aleixpol at kde.org
Sun Aug 19 22:31:25 UTC 2012
On Sat, Aug 18, 2012 at 4:43 PM, Aleix Pol <aleixpol at kde.org> wrote:
> On Sat, Aug 18, 2012 at 4:30 PM, Milian Wolff <mail at milianw.de> wrote:
>> On Saturday 18 August 2012 13:27:46 Aleix Pol wrote:
>>> Hi,
>>> I've just added a new repository with all our unstable plugins called
>>> kde:kdev-ninja [1] which includes support for building projects using
>>> CMake's (changes to adapt it to the cmake plugins already hit master
>>> some weeks ago) ninja [2] generator.
>>>
>>> I think it's interesting because it lets us take advantage of a tool
>>> that tries to improve one of the things that provided a worse
>>> experience from cmake (IMHO of course), which was the wait time while
>>> compiling something that didn't have much changes.
>>
>> Have you built kdevplatform + kdevelop with ninja? What are the steps required
>> to do so?
> Just create a new build directory, create it using -GNinja.
>
> like "cmake -GNInja -DCMAKE_BUILD_TYPE=debug ....."
>
> I recreated all my build directories in my system (whole KDE) and it's
> working fine.
>
>>
>> Generally, can you post some numbers on how much faster an incremental built
>> and a clean built is compared to make?
> I'm not in my system right now, I can try it later if you want. Or you
> can just try it, it's easy to install (if you're in archlinux, yaourt
> -S ninja-git). I think it's noticeably faster.
>
>>
>> And of course, this is awesome if not alone for the Windows people, where
>> ninja is available but make is not.
> :) a sweet side-effect. Haven't tried it yet, though.
>
>>
>> Cheers
>> --
>> Milian Wolff
>> mail at milianw.de
>> http://milianw.de
>> --
>> KDevelop-devel mailing list
>> KDevelop-devel at kdevelop.org
>> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
>>
>
> Aleix
Ok, just tried it, I think there's quite a bit of a difference:
calling "time make -j4":
real 0m5.072s
user 0m3.706s
sys 0m2.247s
calling "time ninja":
real 0m2.016s
user 0m3.016s
sys 0m0.793s
Interesting things:
- ninja takes care about the threading, so we can actually compile
different jobs at the same time and not get the broken output.
- ninja takes care about the process handling, so it will use as much
parallel jobs as it thinks you need.
More information about the KDevelop-devel
mailing list