From dcf8dc7292c3e3c82e1d82676562c0b6954a0216 Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Wed, 17 Jan 2024 16:52:19 +0000 Subject: [PATCH] Added support ccache for speedup recompilation --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7bd640966..6481b8d1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -561,6 +561,12 @@ if (LLAMA_LTO) endif() endif() +find_program(LLAMA_CCACHE_FOUND ccache) +if (LLAMA_CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros) +endif () + # this version of Apple ld64 is buggy execute_process( COMMAND ${CMAKE_C_COMPILER} ${CMAKE_EXE_LINKER_FLAGS} -Wl,-v