aboutsummaryrefslogtreecommitdiffstats
path: root/doc/reference/cli/builtin/cli-build.qdoc
blob: 8e4b8ed44df83bd59a727eba300cbfe3fab1e286 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
/****************************************************************************
**
** Copyright (C) 2017 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qbs.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \contentspage cli.html
    \page cli-build.html
    \ingroup cli

    \title build
    \brief Builds a project.

    \section1 Synopsis

    \code
    qbs build [options] [[config:configuration-name] [property:value] ...]
    \endcode

    \section1 Description

    Builds projects in one or more configurations.

    You can specify \l{Project}{project}, \l{Product}{product}, or
    \l{List of Modules}{module} properties, as well as a \l{Profile}
    {profile} separately for each configuration.

    This is the default command.

    If the build directory does not exist, it will be created.

    For more information, see \l{Building Applications}.

    \section1 Options

    \target build-all-products
    \include cli-options.qdocinc all-products
    \include cli-options.qdocinc build-directory
    \include cli-options.qdocinc changed-files
    \include cli-options.qdocinc check-outputs
    \include cli-options.qdocinc check-timestamps
    \include cli-options.qdocinc clean_install_root
    \include cli-options.qdocinc command-echo-mode
    \include cli-options.qdocinc dry-run
    \include cli-options.qdocinc project-file
    \target build-force-probe-execution
    \include cli-options.qdocinc force-probe-execution
    \include cli-options.qdocinc jobs
    \include cli-options.qdocinc keep-going
    \include cli-options.qdocinc less-verbose
    \include cli-options.qdocinc log-level
    \include cli-options.qdocinc log-time
    \include cli-options.qdocinc more-verbose
    \include cli-options.qdocinc no-install
    \target build-products
    \include cli-options.qdocinc products-specified
    \include cli-options.qdocinc settings-dir
    \include cli-options.qdocinc show-progress
    \include cli-options.qdocinc wait-lock

    \section1 Parameters

    \include cli-parameters.qdocinc configuration-name
    \include cli-parameters.qdocinc property

    \section1 Examples

    Builds the application specified by the \c .qbs file in the current
    directory using the default profile:

    \code
    qbs
    \endcode

    Builds the application using four concurrent build jobs:

    \code
    qbs -j 4
    \endcode

    Builds the default configuration of an application using the profile called
    \c Android:

    \code
    qbs build profile:Android
    \endcode

    Builds the application using different \l{cpp} module properties
    for debug and release configurations. For the debug configuration, warnings
    will cause the build to fail, whereas for the release configuration, the
    size of the build artifacts will be optimized:

    \code
    qbs build config:debug modules.cpp.treatWarningsAsErrors:true config:release modules.cpp.optimization:small
    \endcode
*/