[CMake] CMake/Ninja support in Qt Creator

Peter Kümmel syntheticpp at gmx.net
Wed Sep 19 04:11:40 EDT 2012


On 19.09.2012 09:48, Wouter van Kleunen wrote:
>
> Peter,
>
> I guess removing just the build directory also seems to work.
>
> I agree with your objections of the location the user file, the source
> directory should stay clean. An inattentive moment and you have the file
> in your version control.
>
> Anyway, it seems to build now using an older version of ninja. However
> when I use the 1.0.0 version of ninja, I get the following error:
>
> ninja: FATAL: unknown placeholder '%o' in $NINJA_STATUS

This is needed for printing the compile rate: have a look at
"Compile Output", there you can see the compiled files per second rate.

>
> With the ninja downloaded from here:
> https://github.com/martine/ninja/downloads

This is not a 1.0.0 build, it needs -V for printing the version, which is pre 1.0.
And even 1.0.0 has an ugly bug. Please select the ninja in the bin dir.
I've also uploaded a ninja binary on github.

Peter


>
> Wouter
>
>> Yes, starting from scratch helps in most cases. But with cmake
>> we are used to simply clean the build dir, which doesn't help here.
>>
>> It is a problem that creator's .user file is stored beside
>> the CMakeLists.txt: you can't check it in because of absolute paths,
>> a clean of the repository removes it, a buggy setup
>> is remember by creator, and it violates the principle
>> "don't touch the the source". I told them, but they don't care.
>>
>> Peter
>>
>>
>>
>> On 19.09.2012 08:08, Wouter van Kleunen wrote:
>>>
>>> Peter,
>>>
>>> i had 2.8.9-pre3 before, i upgraded to 2.8.9. But only after deleting
>>> the CMakeLists user file from qtcreator, deleting the build directory
>>> and restarting qtcreator I was able to get the option to build with
>>> Ninja.
>>>
>>> Anyway, it seems to work fine now, and the building is much faster.
>>>
>>>
>>> Wouter
>>>
>>>
>>> Op 18-9-2012 22:50, Peter Kümmel schreef:
>>>> Hi Wouter,
>>>>
>>>> you need the latest cmake version, 2.8.9.
>>>>
>>>> Under Tools/Options/Build&Run/CMake
>>>> the ninja binary could be set, or have it PATH.
>>>>
>>>> Peter
>>>>
>>>> On 18.09.2012 22:29, Wouter van Kleunen wrote:
>>>>>
>>>>> So how do you make it to use ninja ? Should I enable ninja somewhere ?
>>>>> Because when I run cmake from the gui it now still generates
>>>>> nmakefiles.
>>>>>
>>>>> Wouter
>>>>>
>>>>> Op 17-9-2012 18:08, Peter Kümmel schreef:
>>>>>> Qt Creator 2.6 is beta now.
>>>>>>
>>>>>> On github I've uploaded a patched version with Ninja support for
>>>>>> CMake
>>>>>> based projects:
>>>>>>
>>>>>>        https://github.com/syntheticpp/qt-creator/downloads
>>>>>>
>>>>>> When CDB is installed
>>>>>>
>>>>>> http://doc-snapshot.qt-project.org/qtcreator-2.5/creator-debugger-engines.html#supported-cdb-versions
>>>>>>
>>>>>>
>>>>>> debugging works even with the 32bit/64bit compilers of Visual Studio
>>>>>> Express 2012.
>>>>>>
>>>>>>
>>>>>> Currently I'm trying to bring the patches upstream, but for 2.6 it
>>>>>> seems too late.
>>>>>>
>>>>>> Peter
>>>>>> --
>>>>>>
>>>>>> 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
>>>>>
>>>>>
>>>
>>>
>> --
>>
>> 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
>>
>
>


More information about the CMake mailing list