diff --git a/CMakeLists.txt b/CMakeLists.txt index bbf97968..1979781e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,12 @@ if(UNITTEST) message(STATUS "Building the unit tests") endif() +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") +endif() + # Build docs using Doxygen if(DOXYGEN) include(Doxygen) diff --git a/README.md b/README.md index d912c230..1312ae9f 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,7 @@ For the **GNU/Linux build** you need at least: - Ninja build system (Package: `ninja-build`) - Libcurl (Package: `libcurl4-openssl-dev`) - GTK3/Gtkmm3 (Package: `libgtkmm-3.0-dev`) +- Ccache (optional, but much **recommended**: `ccache`) **Dependencies for testing:**