“Speeding Up Compilation Using Precompiled Headers (PCH), CCache and Ninja in CMake”

  by Kevin Funk


We did some experimentation, and a lot of timing, on how to speed up compile times for C++ projects. In this talk, we are going to discuss:

  • Make v.s. Ninja
  • Clang v.s. GCC
  • The effect of using CCache
  • The effect of using Precompiled Headers
  • All that using the CMake build system

Some of the material is indeed Linux specific, while others apply just as well on Mac and Windows.

About the speaker

Kevin has actively developed with Qt/C++ since 2006 and has a special interest in tooling and profiling. He’s been an early contributor to KDAB’s GammaRay analyzer (a high-level Qt application debugger) and thus gained deep knowledge about Qt Core internals. He’s been co-maintainer of the KDevelop IDE, a powerful C/C++ development environment backed by Clang/LLVM, and is pushing for cross-platform success inside KDE. Special interest in large-scale source code refactoring, build tools, CI integration. Kevin holds a Masters Degree in Computer Science.