From ee215905206645c2fa0afbbf6217b4b74e0e51a3 Mon Sep 17 00:00:00 2001 From: Melroy van den Berg Date: Sat, 16 Dec 2023 03:17:29 +0100 Subject: [PATCH] Introduce ccache during the build. Speeds up the (re)builds! --- CMakeLists.txt | 6 ++++++ README.md | 1 + 2 files changed, 7 insertions(+) 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:**