Use 'ccache' if available

This commit is contained in:
Vittorio Romeo 2022-02-28 19:22:28 +00:00
parent 28e935673c
commit 411d702d7a

View File

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