From 411d702d7ac4841e1e549dc5c54b8947594e6f19 Mon Sep 17 00:00:00 2001 From: Vittorio Romeo Date: Mon, 28 Feb 2022 19:22:28 +0000 Subject: [PATCH] Use 'ccache' if available --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 18f99c96..e91fe6be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,13 @@ project(SFML VERSION 3.0.0) set(VERSION_IS_RELEASE OFF) +# use ccache if available +find_program(CCACHE_PROGRAM ccache) +if(CCACHE_PROGRAM) + message(STATUS "Found ccache in ${CCACHE_PROGRAM}") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") +endif() + # include the configuration file include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/Config.cmake)