Added support ccache for speedup recompilation

This commit is contained in:
Herman Semenov 2024-01-17 16:52:19 +00:00 committed by GitHub
parent ba69bbc84c
commit dcf8dc7292
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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