diff options
authorKai Koehne <kai.koehne@qt.io>2018-03-13 11:52:21 +0100
committerKai Koehne <kai.koehne@qt.io>2019-09-16 14:28:33 +0000
commit713c9d8b5dfec9548fb89e1d45b063b7250bdf4f (patch)
parent5b6f320047332bbe07b04730eb537d473002acd3 (diff)
Add how-to about ccache
Task-number: QBS-1325 Change-Id: Ice2e5f16b453b9bde8d2a90918eb593db81bff97 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Richard Weickelt <richard@weickelt.de>
2 files changed, 32 insertions, 1 deletions
diff --git a/doc/external-resources.qdoc b/doc/external-resources.qdoc
index c66d9633c..00b7bf975 100644
--- a/doc/external-resources.qdoc
+++ b/doc/external-resources.qdoc
@@ -126,3 +126,12 @@
+ \externalpage https://ccache.samba.org/
+ \title ccache
+ \externalpage https://ccache.samba.org/manual.html#_precompiled_headers
+ \title ccache documentation about precompiled headers
diff --git a/doc/howtos.qdoc b/doc/howtos.qdoc
index a2595cffd..f394719e0 100644
--- a/doc/howtos.qdoc
+++ b/doc/howtos.qdoc
@@ -1,6 +1,6 @@
-** Copyright (C) 2017 The Qt Company Ltd.
+** Copyright (C) 2018 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
** This file is part of Qbs.
@@ -40,6 +40,7 @@
\li \l{How do I use precompiled headers?}
\li \l{How do I make sure my generated sources are getting compiled?}
\li \l{How do I run my autotests?}
+ \li \l{How do I use ccache?}
\li \l{How do I create a module for a third-party library?}
\li \l{How do I build against libraries that provide pkg-config files?}
\li \l{How do I create application bundles and frameworks on iOS, macOS, tvOS, and watchOS?}
@@ -215,6 +216,27 @@
See the \l{AutotestRunner}{AutotestRunner documentation} for how to fine-tune the behavior.
+ \section1 How do I use ccache?
+ \l ccache is a popular C/C++ compiler cache on Unix to speed up compiling the
+ same content multiple times.
+ \QBS excels at tracking dependencies and avoiding needless recompilations, so
+ for linear development of one project and configuration using ccache
+ has little benefit. But if you switch between revisions of a project,
+ or build the same project with different configurations, a global cache like
+ ccache can speed up compilations significantly.
+ ccache can be used by setting up symbolic links to compiler executables
+ (such as \c g++, \c gcc) in the file system. In this setup, the use of ccache is
+ transparent to \QBS. If you prefer to call ccache explicitly, you should
+ set \l{cpp::compilerWrapper}{cpp.compilerWrapper} to \c ccache.
+ \note Using precompiled headers might prevent ccache from actually
+ using cached results. To work around this, you can set
+ \c{sloppiness=pch_defines,time_macros} in your local ccache options.
+ See the \l{ccache documentation about precompiled headers} for further details.
\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