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)