summaryrefslogtreecommitdiffstats
path: root/qmake/doc/src/qmake-manual.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/doc/src/qmake-manual.qdoc')
-rw-r--r--qmake/doc/src/qmake-manual.qdoc65
1 files changed, 52 insertions, 13 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc
index da3aa6b248..3a1d79cb79 100644
--- a/qmake/doc/src/qmake-manual.qdoc
+++ b/qmake/doc/src/qmake-manual.qdoc
@@ -936,7 +936,9 @@
file.
\row \li ordered \li When using the \c subdirs template, this option
specifies that the directories listed should be processed in the
- order in which they are given.
+ order in which they are given. \note The use of this option is discouraged.
+ Specify dependencies as described in the \l{#SUBDIRS}{SUBDIRS}
+ variable documentation.
\row \li precompile_header \li Enables support for the use of
\l{Using Precompiled Headers}{precompiled headers} in projects.
\row \li precompile_header_c (MSVC only) \li Enables support for the use of
@@ -1166,7 +1168,7 @@
\section1 DEFINES_DEBUG
Specifies preprocessor defines for the debug configuration. The values of
- this variable get added to \l{DEFINES} before the project is loaded. This
+ this variable get added to \l{DEFINES} after the project is loaded. This
variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs
to be modified.
@@ -1176,10 +1178,13 @@
\section1 DEFINES_RELEASE
Specifies preprocessor defines for the release configuration. The values of
- this variable get added to \l{DEFINES} before the project is loaded. This
+ this variable get added to \l{DEFINES} after the project is loaded. This
variable is typically set in \l{#QMAKESPEC}{qmake.conf} and rarely needs
to be modified.
+ \note For MSVC mkspecs, this variable contains the value \c NDEBUG by
+ default.
+
This variable was introduced in Qt 5.13.2.
\target DEF_FILE
@@ -1329,7 +1334,7 @@
\li Value
\li Description
\row
- \li no_check_exists
+ \li no_check_exist
\li If not set, qmake looks to see if the files to install actually
exist. If these files don't exist, qmake doesn’t create the
install rule. Use this config value if you need to install
@@ -1577,6 +1582,12 @@
\l{CONFIG}{CONFIG += lrelease} will be installed to. Does not have any
effect if \l{CONFIG}{CONFIG += embed_translations} is set.
+ \target QML_IMPORT_PATH
+ \section1 QML_IMPORT_PATH
+
+ This variable is only used by \l{Qt Creator Manual}{Qt Creator}.
+ See \l{Qt Creator: Using QML Modules with Plugins} for details.
+
\target QMAKE_systemvariable
\section1 QMAKE
@@ -2724,21 +2735,35 @@
\snippet code/doc_src_qmake-manual.pro 50
- If you need to ensure that the subdirectories are built in the order in
- which they are specified, update the \l{#CONFIG}{CONFIG} variable to
- include the \c ordered option:
+ If you need to ensure that the subdirectories are built in a particular
+ order, use the \c .depends modifier on the relevant \c SUBDIRS elements.
+
+ For example:
\snippet code/doc_src_qmake-manual.pro 51
- It is possible to modify this default behavior of \c SUBDIRS by giving
- additional modifiers to \c SUBDIRS elements. Supported modifiers are:
+ The configuration above ensures that \c{my_library} is built before
+ \c{my_executable} and that \c{my_executable} is built before \c{tests}.
+ However, \c{doc} can be built in parallel with the other subdirectories,
+ thus speeding up the build process.
+
+ \note Multiple dependencies can be listed and they will all be built before
+ the target that depends on them.
+
+ \note Using \l{#CONFIG}{CONFIG += ordered} is discouraged as it can slow down
+ multi-core builds. Unlike the example shown above, all builds will happen
+ sequentially even if they don't have dependencies.
+
+ Beside defining the build order, it is possible to modify the default behavior
+ of \c SUBDIRS by giving additional modifiers to \c SUBDIRS elements.
+ Supported modifiers are:
\table
\header \li Modifier \li Effect
\row \li .subdir \li Use the specified subdirectory instead of \c SUBDIRS value.
\row \li .file \li Specify the subproject \c pro file explicitly. Cannot be
used in conjunction with \c .subdir modifier.
- \row \li .depends \li This subproject depends on specified subproject.
+ \row \li .depends \li This subproject depends on specified subproject(s).
\row \li .makefile \li The makefile of subproject.
Available only on platforms that use makefiles.
\row \li .target \li Base string used for makefile targets related to this
@@ -4412,6 +4437,20 @@
\snippet qmake/scopes.pro 4
+ If you need to mix both operators, you can use the \c if function to specify
+ operator precedence.
+
+ \snippet qmake/scopes.pro 5
+
+ The condition accepts the wildcard character to match a family of \c{CONFIG}
+ values or mkspec names.
+
+ \snippet qmake/scopes.pro 6
+
+ \note Historically, checking the mkspec name with wildcards like above was
+ qmake's way to check for the platform. Nowadays, we recommend to use values
+ that are defined by the mkspec in the \c QMAKE_PLATFORM variable.
+
You can also provide alternative declarations to those within a scope by
using an \c else scope. Each \c else scope is processed if the conditions
for the preceding scopes are false.
@@ -4690,7 +4729,7 @@
The definitions above define a qmake target called \c mytarget, containing a
Makefile target called \c{.buildfile} which in turn is generated with the
- \l{touchfunction}{touch()} function. Finally, the
+ \c touch command. Finally, the
\c{.depends} member specifies that \c mytarget depends on \c mytarget2,
another target that is defined afterwards. \c mytarget2 is a dummy target.
It is only defined to echo some text to the console.
@@ -5407,8 +5446,8 @@
\li The exit code of the test will be ignored during \c{make check}.
\endtable
- Testcases will often be written with \l{QTest} or \l{TestCase}, but
- that is not a requirement to make use of \c{CONFIG+=testcase} and \c{make check}.
+ Test cases will often be written with \l{QTest} or \c{TestCase}, but
+ it is not a requirement to make use of \c{CONFIG+=testcase} and \c{make check}.
The only primary requirement is that the test program exit with a zero exit code
on success, and a non-zero exit code on failure.