From ddf8fbc08560fa3b1aeb63e6f07c9e2e8199c9e7 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 7 Jul 2026 17:57:41 +0300 Subject: [PATCH] BuildSystem: Use ccache if found --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d6a35bb..c68dafca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,12 @@ set(BUILD_SHARED_LIBS True) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +find_program(CCACHE_PROGRAM "ccache") +if (CCACHE_PROGRAM) + set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") + set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}") +endif() + # include headers of ${library} to ${target} function(banan_include_headers target library) target_include_directories(${target} PUBLIC $/include)