Doc: Describe setting Ninja as the CMake generator

Task-number: QTCREATORBUG-22889
Change-Id: Ide3e7ebdb08791790d2370ed6841ee203ea5548f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Leena Miettinen
2019-09-02 17:01:24 +02:00
parent 428d8f0307
commit b648749926
3 changed files with 36 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -1,6 +1,6 @@
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -73,9 +73,42 @@
\image qtcreator-cmake-build-steps.png
\note While the other CMake generators are installed together with Qt,
you usually need to install Ninja yourself. For more information, see
\l {Using Ninja as a CMake Generator}.
//! [cmake build steps]
//! [cmake ninja]
\section2 Using Ninja as a CMake Generator
To use \l {https://ninja-build.org/}{Ninja} with CMake, you must install it
and select it as the CMake generator in the build and run kit:
\list 1
\li Install Ninja.
\li Add the path to the Ninja executable to the value of the PATH system
variable.
\li Select \uicontrol Tools > \uicontrol Options > \uicontrol Kits, and
then select the build and run kit for the project.
\li Select \uicontrol Change next to the \uicontrol {CMake generator}
field to open the \uicontrol {CMake Generator} dialog.
\image qtcreator-build-steps-cmake-ninja.png
\li In the \uicontrol Generator field, select \uicontrol Ninja.
\li Select \uicontrol OK to return to the \uicontrol Kits tab.
\li Select \uicontrol OK or \uicontrol Apply to save your changes.
\endlist
\note To make sure that old build artifacts don't get in the way
the first time you build the project after the change, select
\uicontrol Build > \uicontrol {Rebuild Project}. This cleans up the
build directory and performs a new build.
//! [cmake ninja]
//! [cmake clean steps]
\section2 CMake Clean Steps

View File

@@ -194,6 +194,8 @@
choose the kit to use. To set the selected kit as the default kit,
select \uicontrol {Make Default}.
\include creator-projects-cmake-building.qdocinc cmake ninja
\section1 Editing Qbs Profiles
To view the Qbs profile associated with the kit, select \uicontrol Tools >