diff options
author | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-02-15 09:42:29 +0100 |
---|---|---|
committer | Leena Miettinen <riitta-leena.miettinen@qt.io> | 2018-02-15 09:24:40 +0000 |
commit | 72c8f0dacfd7180bff5c2096fbbf41e5395c844d (patch) | |
tree | a589f68fdbaca07ea0ac95c33c20796775d73e49 /doc/howtos.qdoc | |
parent | 229a889342de306a51fb6c13787708085f631e03 (diff) | |
download | qbs-72c8f0dacfd7180bff5c2096fbbf41e5395c844d.tar.gz |
Doc: Add a how-to for using precompiled headers
Task-number: QBS-1184
Change-Id: Icb72672b36da8a4ccea7edc84bc3c71a4355f2d5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'doc/howtos.qdoc')
-rw-r--r-- | doc/howtos.qdoc | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc index 1a6e77eda..714996e34 100644 --- a/doc/howtos.qdoc +++ b/doc/howtos.qdoc @@ -37,6 +37,7 @@ \list \li \l{How do I build a Qt-based project?} \li \l{How do I make my app build against my library?} + \li \l{How do I use precompiled headers?} \li \l{How do I create a module for a third-party library?} \li \l{How do I create application bundles and frameworks on iOS, macOS, tvOS, and watchOS?} \li \l{How do I apply C/C++ preprocessor macros to only a subset of the files in my product?} @@ -106,6 +107,31 @@ The product definitions would stay exactly the same. In particular, their location in the project tree is irrelevant to the relationship between them. + \section1 How do I use precompiled headers? + + If you use a \l Group item to add a precompiled header file to a product + and mark it with the \l{filetags-cpp}{relevant file tag} (\c c_pch_src, + \c cpp_pch_src, \c objc_pch_src, or \c objcpp_pch_src), it is used + automatically. + + Only one precompiled header is allowed per product and language. + + For example: + + \code + import qbs + + CppApplication { + name: "the-app" + files: ["main.cpp"] + + Group { + files: ["precompiled-header.pch"] + fileTags: ["cpp_pch_src"] + } + } + \endcode + \section1 How do I create a module for a third-party library? If you have pre-built binary files in your source tree, you can create |