aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2019-09-02 17:01:24 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2019-09-03 14:00:49 +0000
commitb6487499260f19aacc7d39ae6d410c27109e53e7 (patch)
tree9dcdfe837017f9e34a823eea2479f9c3179ad83d
parent428d8f03079a531c45cc3dfb79b58e307aa12ffd (diff)
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>
-rw-r--r--doc/images/qtcreator-build-steps-cmake-ninja.pngbin0 -> 34365 bytes
-rw-r--r--doc/src/cmake/creator-projects-cmake-building.qdocinc35
-rw-r--r--doc/src/projects/creator-only/creator-projects-targets.qdoc2
3 files changed, 36 insertions, 1 deletions
diff --git a/doc/images/qtcreator-build-steps-cmake-ninja.png b/doc/images/qtcreator-build-steps-cmake-ninja.png
new file mode 100644
index 0000000000..0f1ba4fa74
--- /dev/null
+++ b/doc/images/qtcreator-build-steps-cmake-ninja.png
Binary files differ
diff --git a/doc/src/cmake/creator-projects-cmake-building.qdocinc b/doc/src/cmake/creator-projects-cmake-building.qdocinc
index 8cc91516e8..bca11658e4 100644
--- a/doc/src/cmake/creator-projects-cmake-building.qdocinc
+++ b/doc/src/cmake/creator-projects-cmake-building.qdocinc
@@ -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
diff --git a/doc/src/projects/creator-only/creator-projects-targets.qdoc b/doc/src/projects/creator-only/creator-projects-targets.qdoc
index 6438abc42b..dc23a5e834 100644
--- a/doc/src/projects/creator-only/creator-projects-targets.qdoc
+++ b/doc/src/projects/creator-only/creator-projects-targets.qdoc
@@ -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 >