From dabf62e70a75ef2276447f13033e3b6faf643adf Mon Sep 17 00:00:00 2001 From: Herman Semenov Date: Wed, 17 Jan 2024 19:33:02 +0300 Subject: [PATCH] Added support ccache for speedup recompilation --- regamedll/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/regamedll/CMakeLists.txt b/regamedll/CMakeLists.txt index 69f710b31..40c3720ae 100644 --- a/regamedll/CMakeLists.txt +++ b/regamedll/CMakeLists.txt @@ -115,6 +115,12 @@ if (NOT DEBUG) -Wl,-gc-sections -Wl,--version-script=\"${PROJECT_SOURCE_DIR}/../version_script.lds\"") endif() +find_program(CCACHE_FOUND ccache) +if (CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set(ENV{CCACHE_SLOPPINESS} pch_defines,time_macros) +endif () + set(PROJECT_SRC_DIR "${PROJECT_SOURCE_DIR}" "${PROJECT_SOURCE_DIR}/engine"