Using pre-compiled headers with CMake

Glutinous picture Glutinous · Sep 29, 2008 · Viewed 68.4k times · Source

I have seen a few (old) posts on the 'net about hacking together some support for pre-compiled headers in CMake. They all seem a bit all-over the place and everyone has their own way of doing it. What is the best way of doing it currently?

Answer

sakra picture sakra · Mar 23, 2012

There is a third party CMake module named 'Cotire' which automates the use of precompiled headers for CMake based build systems and also supports unity builds.