diff options
-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 |