-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
3 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
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) |