From 8655950638cbfb8976c2b57d1fe43a867357caae Mon Sep 17 00:00:00 2001 From: Berkus Decker Date: Wed, 22 Nov 2017 04:25:21 +0200 Subject: [PATCH] Add ccache support --- Telegram/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt index 0bb755807..e1e298cf1 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt @@ -9,6 +9,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux") endif() endif() +find_program(CCACHE ccache) +if (CCACHE) + message(STATUS "Enabling ccache") + set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE}) + set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE}) +endif() + ##====================== ## Codegen Tools ##======================