diff --git a/mkspecs/features/unix/ccache.prf b/mkspecs/features/unix/ccache.prf index d5739d3eaba..ff6173171ab 100644 --- a/mkspecs/features/unix/ccache.prf +++ b/mkspecs/features/unix/ccache.prf @@ -2,18 +2,22 @@ macx-xcode: return() darwin: load(sdk) -ccache_prefix = ccache +launcher_prefix = ccache -precompile_header { +!isEmpty(QMAKE_CACHE_LAUNCHER_PREFIX) { + launcher_prefix = $$QMAKE_CACHE_LAUNCHER_PREFIX +} + +precompile_header:contains(launcher_prefix, ccache) { CCACHE_SLOPPINESS += pch_defines time_macros - ccache_prefix = \ + launcher_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 + $$launcher_prefix } for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_LINK_C)): \ - $$tool = $$ccache_prefix $$eval($$tool) + $$tool = $$launcher_prefix $$eval($$tool)