Since Qt 5.9.2 we have built-in support for ccache.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2019-08-12 11:17:09 +03:00
parent 7fe7c6cacf
commit cc4d69d998

View File

@ -201,20 +201,21 @@ defineReplace(enable_ccache){
} else { } else {
# ccache support only Unix systems. # ccache support only Unix systems.
unix:{ unix:{
# This need for turn on ccache. equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 8):greaterThan(QT_PATCH_VERSION, 1) {
*g++*{ # since Qt 5.9.2 we have built-in support for ccache
QMAKE_CC = ccache gcc CONFIG += ccache
export(QMAKE_CC) # export value to global variable. export(CONFIG) # export value to global variable.
} else {
ccache_prefix = ccache
QMAKE_CXX = ccache g++ for(tool, $$list(QMAKE_CC QMAKE_CXX QMAKE_LINK QMAKE_LINK_SHLIB QMAKE_LINK_C)): \
export(QMAKE_CXX) # export value to global variable. $$tool = $$ccache_prefix $$eval($$tool)
}
*clang*{
QMAKE_CC = ccache clang
export(QMAKE_CC) # export value to global variable.
QMAKE_CXX = ccache clang++ export(QMAKE_CC)
export(QMAKE_CXX) # export value to global variable. export(QMAKE_CXX)
export(QMAKE_LINK)
export(QMAKE_LINK_SHLIB)
export(QMAKE_LINK_C)
} }
} else { } else {
$$set_PCH() $$set_PCH()