diff options
| author | Andreas Eliasson <andreas.eliasson@qt.io> | 2022-06-03 14:55:04 +0200 |
|---|---|---|
| committer | Andreas Eliasson <andreas.eliasson@qt.io> | 2022-06-21 11:08:49 +0000 |
| commit | ac171469a0021b5ddabd0197c31b814fbbaad16a (patch) | |
| tree | b4fec5c60962aee4bd02bf72ab844557d1dc2002 /src/testlib/doc/includes/building-examples.qdocinc | |
| parent | 56a33edf2a156727043c47023f5503f88913b466 (diff) | |
Doc: Revise Qt Test tutorial
- Make it explicit that each chapter can be run as a stand-alone test
application
- Add a CMake section on how to build the executable
Task-number: QTBUG-103730
Pick-to: 6.4 6.3
Change-Id: Id4c87c454521f698dcf16cfdc176318dd3e16786
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Diffstat (limited to 'src/testlib/doc/includes/building-examples.qdocinc')
| -rw-r--r-- | src/testlib/doc/includes/building-examples.qdocinc | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/src/testlib/doc/includes/building-examples.qdocinc b/src/testlib/doc/includes/building-examples.qdocinc new file mode 100644 index 00000000000..ab845dd482c --- /dev/null +++ b/src/testlib/doc/includes/building-examples.qdocinc @@ -0,0 +1,41 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR +// GFDL-1.3-no-invariants-only + +//! [building the executable] + You can build the test case executable using CMake or qmake. + + \section2 Building with CMake + + Configure your build settings in your CMakeLists.txt file: + + \quotefile \1/CMakeLists.txt + + Next, from the command line, run either \c cmake or use the \c qt-cmake + convenience script located in + \c Qt-prefix/<version>/<platform>/bin/qt-cmake: + + \badcode + <Qt-prefix>/<version>/<platform>/bin/qt-cmake <source-dir> <build-dir> -G Ninja + \endcode + + Then, run your preferred generator tool to build the executable. Here, we're + using Ninja: + + \badcode + ninja + \endcode + + \section2 Building with qmake + + Configure your build settings in your \c .pro file: + + \quotefile \1/\1.pro + + Next, run \c qmake, and, finally, run \c make to build your executable: + + \badcode + qmake + make + \endcode +//! [building the executable] |
