CCache and precompiled headers do not work together.
The following discussion from !4366 (merged) should be addressed:
-
@bilke started a discussion: (+1 comment) Wow, thanks for the test! The test script looks good. I also checked the CMake bible and setting the sloppiness as we already did should be enough:
If precompiled headers are enabled, it is important to set this option to pch_defines,time_macros. The Precompiled headers section of the Ccache documentation explains why these settings are needed. For improved cache hit performance, it may also be desirable to add include_file_mtime to the list of sloppiness options. This comes with a theoretical risk of a race condition, but for typical scenarios, that race condition is highly unlikely (files included by the preprocessor would have to be updated while the source is being compiled). Consult the Ccache manual for details before deciding whether to add include_file_mtime to the sloppiness options.
If we cannot track this down in the next days (because nobody has time it) I suggest to merge this now and create an issue for later. What do you think?