Can I speed up IWYU with CCache?

229 Views Asked by At

I'm developing a project which uses CMake for build system generation, CCache for speeding up the build (set via CMAKE_CXX_COMPILER_LAUNCHER), and Include What You Use for tidying up the required headers (set via CMAKE_CXX_INCLUDE_WHAT_YOU_USE).

IWYU takes quite some time to analyze all the project files which makes the build unnecessarily long.

Is there a way to cache its results using CCache?

IWYU returns with exit code 1 if there were any suggestions and 2 if there were none, so I tried creating a wrapper that returns 0 instead of 2 because CCache requires this to cache results, but it didn't help much. Now it complains that no output files were created. Is this the right way to go?

0

There are 0 best solutions below