[CMake] CMake/Ninja support in Qt Creator

Marcus D. Hanwell marcus.hanwell at kitware.com
Tue Sep 25 17:17:50 EDT 2012


On Tue, Sep 25, 2012 at 2:56 PM, Peter Kümmel <syntheticpp at gmx.net> wrote:
> On 25.09.2012 17:29, Marcus D. Hanwell wrote:
>>
>> On Thu, Sep 20, 2012 at 7:26 AM, Peter Kümmel <syntheticpp at gmx.net> wrote:
>>>
>>> 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.
>>>
>>>
>>>
>>> I've uploaded a new version:
>>>
>>> - Now out-of-source project files are supported (for cmake projects).
>>>    There will be two new files in the build folder CMake.qtcreator and
>>> CMakeLists.txt.user
>>>    CMake.qtcreator should be opened with creator.
>>>
>>> - out-of-source is default, could be changed by a check box in the wizard
>>>
>>> - shipped ninja.exe (>1.0.0) is found automatically
>>>
>>> - generators are updated when cmake is selected in the wizard
>>>
>>> - a cmake warning about QT_QMAKE_EXECUTABLE could be suppressed when the
>>> project doesn't use Qt
>>>
>> I just saw this thread, on Linux if I already have CMake 2.8.9 and a
>> recent ninja build I take it I just need your patched Qt Creator? I
>> tried adding custom build steps and that kind of works but I lose the
>> warning/error parsing - would that work with this patched version?
>
> Yes, complete warning/error parsing. Use the 2.6-ninja branch.
>
Just got this compiled - it looks great.
>>
>> Thanks for all your work, I am looking forward to Ninja generator
>> integration in Qt Creator!
>
> You are welcome! Please post any issue, I'll try to fix them.

Will do, so far it seems to be working great. It is nice to have an
option to store the CMakeLists.txt.user in the build directory too,
that always bugged me and I wondered why they had chosen to go that
way. Looks great, with all warnings etc showing up in the editor as I
would expect.

I have tested it with VTK, and will likely look at some of the other
projects I am working on soon. So far so good - thanks for pushing
this forward. How much of this will make it into Qt Creator 2.6?

Marcus


More information about the CMake mailing list