qt5base-lts/mkspecs/features/unix/ccache.prf
Tor Arne Vestbø d64940891d Add qmake feature and configure option to use ccache
Enabled via configure --ccache, or CONFIG += ccache in 3rd party
projects.

Ensures that we use the right sloppiness and other ccache options
during compilation.

Task-number: QTBUG-31034
Change-Id: I696b3d3f0398873a29b93d1bc2b4d4e06ef23dc9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-09-05 10:47:35 +00:00

20 lines
606 B
Plaintext

macx-xcode: return()
darwin: load(sdk)
ccache_prefix = ccache
precompile_header {
CCACHE_SLOPPINESS += pch_defines time_macros
ccache_prefix = \
CCACHE_SLOPPINESS=\"$$join(CCACHE_SLOPPINESS, ',')\$${CCACHE_SLOPPINESS+,\$$CCACHE_SLOPPINESS}\" \
# Make sure we build sources directly, not from their preprocessed version,
# otherwise precompiled headers will not be used during cache misses.
CCACHE_CPP2=true \
$$ccache_prefix
}
for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_LINK_C)): \
$$tool = $$ccache_prefix $$eval($$tool)