aboutsummaryrefslogtreecommitdiffstats
path: root/doc/reference/cli/cli-options.qdocinc
blob: e6d90996341754cd8e47d74f4aca2d95d3a2145d (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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
/****************************************************************************
**
** 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$
**
****************************************************************************/

/*!

//! [all-products]

    \section2 \c --all-products

    Processes all \l{Product}{products}, even if their \c builtByDefault
    property is \c false.

//! [all-products]

//! [blacklist]

    \section2 \c {--blacklist <blacklist>}

    Ignores files whose names match the patterns specified by \c <blacklist>.
    The list entries can contain wildcards and are separated by commas.

    By default, no files are ignored.

//! [blacklist]

//! [build-directory]

    \section2 \c {--build-directory|-d <directory>}

    Specifies a \c <directory> where build artifacts are stored.

    The default value is the current directory unless
    \c preferences.defaultBuildDirectory is set.

    Relative paths will be interpreted relative to the current directory.

    You can use the following special values as placeholders:

    \list
        \li \c @project is expanded to the name of the project file excluding
            the extension \c .qbs.
        \li \c @path is expanded to the name of the directory containing the
            project file.
    \endlist

//! [build-directory]

//! [changed-files]

    \section2 \c {--changed-files <file>[,<file>...]}

    Assumes that the files specified by \c <file>, and only those files, have
    changed.

//! [changed-files]

//! [check-outputs]

    \section2 \c --check-outputs

    Forces transformer output \l{Artifact}{artifact} checks.

    Verifies that the output artifacts declared by \l{Rule}{rules} in the
    \l{Project}{project} are actually created.

//! [check-outputs]

//! [check-timestamps]

    \section2 \c --check-timestamps

    Forces timestamp checks.

    Retrieves the timestamps from the file system, instead of using the file
    timestamps that are stored in the build graph.

//! [check-timestamps]

//! [clean_install_root]

    \section2 \c --clean-install-root

    Removes the installation base directory before installing.

//! [clean_install_root]

//! [command-echo-mode]

    \section2 \c {--command-echo-mode <mode>}

    Determines what kind of output to show when executing commands.

    Possible values of \c <mode> are:

    \list
        \li \c silent
        \li \c summary (default value)
        \li \c command-line
        \li \c command-line-with-environment
    \endlist

//! [command-echo-mode]

//! [detect-qt-versions]

    \section2 \c --detect

    Attempts to auto-detect all known Qt versions, looking them up in the PATH
    environment variable.

//! [detect-qt-versions]

//! [detect-toolchains]

    \section2 \c --detect

    Attempts to auto-detect all known toolchains, looking them up in the PATH
    environment variable.

//! [detect-toolchains]

//! [dry-run]

    \section2 \c --dry-run|-n

    Performs a dry run. No commands will be executed and no permanent changes to
    the build graph will be done.

//! [dry-run]

//! [export]

    \section2 \c {--export <file>}

    Exports settings to the specified \c <file>.

//! [export]

//! [project-file]

    \section2 \c {[--file|-f <file>]}

    Uses \c <file> as the project file. If \c <file> is a directory and it
    contains a single file with the extension \c .qbs, that file will be used.

    If this option is not given at all, the behavior is the same as for
    \c{-f <working-dir>}.

//! [project-file]

//! [flat]

    \section2 \c --flat

    Does not create nested project files, even if there are subdirectories and
    the top-level directory does not contain any files.

//! [flat]

//! [force-probe-execution]

    \section2 \c --force-probe-execution

    Forces re-execution of all \l{Probe} items' configure scripts,
    rather than using the cached data.

//! [force-probe-execution]

//! [generator]

    \section2 \c {--generator|-g <generator>}

    Uses the specified build system generator.

    Possible values of \c <generator> include:

    \list
        \li \c clangdb
        \li \c visualstudio2015
    \endlist

    The available generators are listed if you run the \c {qbs generate} command
    without passing a generator to it.

//! [generator]

//! [help]

    \section2 \c {--help|-h|-?}

    Displays help for the command.

//! [help]

//! [import]

    \section2 \c {--import <file>}

    Imports settings from the specified \c <file>.

//! [import]

//! [install-root]

    \section2 \c {--install-root <directory>}

    Installs into the specified \c <directory>. If the directory does not exist,
    it will be created.

    The default value is \c <build dir>/install-root.

    Use the special value \c @sysroot to install into the \c sysroot. That is,
    the value of the \l{qbs::sysroot}{qbs.sysroot} property.

//! [install-root]

//! [jobs]

    \section2 \c {--jobs|-j <n>}

    Uses \c <n> concurrent build jobs, where \c <n> must be an integer greater
    than zero.

    The default is the number of logical cores.

//! [jobs]

//! [job-limits]

    \section2 \c {--job-limits <pool1>:<limit1>[,<pool2>:<limit2>...]}

    Sets pool-specific job limits. See \l{job-pool-howto}{here} for more information on
    job pools.

    \section2 \c {--enforce-project-job-limits}

    Normally, job limits defined in project files via the \l JobLimit item get overridden
    by those set on the command line. If this option is passed, they get maximum priority
    instead. Use it if there are product-specific limits that make more sense for
    that part of the code base than the generic ones you'd like to apply globally.

//! [jobs]

//! [keep-going]

    \section2 \c --keep-going|-k

    Keeps going when errors occur, if at all possible.

//! [keep-going]

//! [less-verbose]

    \section2 \c --less-verbose|-q

    Becomes more quiet by decreasing the log level by one. This option can be
    given more than once. Excessive occurrences have no effect.

    If the option \c --log-level appears anywhere on the command line in
    addition to this option, its value is taken as the base for the decrease.

//! [less-verbose]

//! [list-root]

    \section2 \c {--list [<root> ...]}

    Lists keys under the key \c <root> or all keys if the root is not specified.

    Possible values are:

    \list
        \li \c defaultProfile is the default \l{Profile}{profile} to use
            if a profile is not specified
        \li \c preferences accepts build preferences as second-level keys
        \li \c profiles accepts profile names as second-level keys

    \endlist

//! [list-root]

//! [config-user]

    \section2 \c {--user}

    Causes read operations to display only the user-level settings,
    while the system-level settings are ignored.
    Write operations will target the user-level settings, which is also the default.

//! [config-user]

//! [config-system]

    \section2 \c {--system}

    Read and write operations will consider only the system-level settings.

//! [config-system]

//! [config-ui-system]

    \section2 \c {--system}

    Instructs the tool to work on the system-level settings. Otherwise,
    the user-level settings are presented.

//! [config-ui-system]

//! [log-level]

    \section2 \c {--log-level <level>}

    Uses the specified log level.

    Possible values of \c <level> are:

    \list
        \li \c error
        \li \c warning
        \li \c info (default value)
        \li \c debug
        \li \c trace
   \endlist

//! [log-level]

//! [log-time]

    \section2 \c --log-time

    Logs the time that the operations involved in this command take.

    This option is implied in log levels \c debug and higher.

    This option is mutually exclusive with \c --show-progress.

//! [log-time]

//! [more-verbose]

    \section2 \c --more-verbose|-v

    Becomes more verbose by increasing the log level by one. This option can be
    given more than once. Excessive occurrences have no effect.

    If the option \c --log-level appears anywhere on the command line in
    addition to this option, its value is taken as the base for the increase.

//! [more-verbose]

//! [ndk-dir]

    \section2 \c {--ndk-dir <directory>}

    Specifies a \c <directory> that contains an Android NDK.

//! [ndk-dir]

//! [no-build]

    \section2 \c --no-build

    Does not re-build the project before installing or running it.

//! [no-build]

//! [no-install]

    \section2 \c --no-install

    Does not install any artifacts as part of the build process.

//! [no-install]

//! [products-specified]

    \section2 \c {--products|-p <name>[,<name>...]}

    Takes only the \l{Product}{products} specified by \c <name> and their
    dependencies into account.

//! [products-specified]

//! [qt-dir]

    \section2 \c {--qt-dir <directory>}

    Specifies a \c <directory> that contains a Qt version.

//! [qt-dir]

//! [sdk-dir]

    \section2 \c {--sdk-dir <directory>}

    Specifies a \c <directory> that contains an Android SDK.

//! [sdk-dir]

//! [settings-dir]

    \section2 \c {--settings-dir <directory>}

    Reads all settings (such as \l{Profile}{profile} information) from the
    specified \c <directory>. If the directory does not exist, it will be
    created.

    The default value is system-specific. For example:

    \list
        \li Linux: \c $HOME/.config/QtProject/qbs
        \li Windows: \c %APPDATA%\QtProject\qbs
        \li macOS: \c $HOME/Library/Preferences/qbs
    \endlist

//! [settings-dir]

//! [setup-run-env-config]

    \section2 \c --setup-run-env-config

    A comma-separated list of strings. They will show up in the \c config
    parameter of all \l{Module::}{setupRunEnvironment} scripts.

//! [setup-run-env-config]


//! [show-progress]

    \section2 \c --show-progress

    Shows how command execution is progressing.

    This option is mutually exclusive with \c --log-time.

    \note This option is not available on a Windows host.

//! [show-progress]

//! [setup-tools-system]

    \section2 \c {--system}

    If this option is given, the profile(s) created by this tool will end up
    in the system-level settings and thus be available to all users.
    Otherwise, they go into the user-level settings.

//! [setup-tools-system]

//! [type]

    \section2 \c {--type <toolchain type>}

    Specifies the type of the toolchain. Needed if \QBS cannot determine the
    compiler from the name of the executable file located in the specified
    directory.

    Possible values include:

    \list
        \li \c clang
        \li \c gcc
        \li \c mingw
        \li \c msvc
     \endlist

//! [type]

//! [unset]

    \section2 \c {--unset <key>}

    Removes the specified \c <key>.

//! [unset]

//! [wait-lock]

    \section2 \c --wait-lock

    Waits indefinitely for other processes to release the build graph lock.

    This option is typically used by \l{Generators}{generators}, which may
    re-invoke multiple \QBS processes on the same project simultaneously.

//! [wait-lock]

//! [whitelist]

    \section2 \c {--whitelist <whitelist>}

    Considers only files whose names match the patterns specified by
    \c <whitelist>. The list entries can contain wildcards and are separated by
    commas.

    By default, all files are considered.

//! [whitelist]

*/