cmake: Enable ccache by default, if available
authorManuel Nickschas <sputnick@quassel-irc.org>
Sat, 16 Jun 2018 19:58:51 +0000 (21:58 +0200)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 16 Jun 2018 20:50:05 +0000 (22:50 +0200)
commit41f7cd2411c6500bd6a07be63f3adb1c0eb890a7
tree4755d6a751a3d4440284385e18772ff7d89602a1
parenta4f4d8fe57d3e70d2f0ebdb31ca17234ccb28faf
cmake: Enable ccache by default, if available

Check for the existence of the ccache binary, and enable ccache
support if available. This avoids the need for hacks using PATH
or the CXX variable to make ccache work.

The automatic detection can be disabled by passing -DUSE_CCACHE=OFF
to CMake (may be useful for distributors having their own ccache
infrastructure in place).

Reorder things in the top-level CMakeLists.txt a bit, because ccache
should be enabled before calling project() (which checks compiler
settings).
CMakeLists.txt
INSTALL
cmake/QuasselCompileSettings.cmake