Added CCACHE detection and option to disable.

This commit is contained in:
Armin Novak 2017-01-25 09:05:27 +01:00
parent d3429109dd
commit a14892773c
2 changed files with 7 additions and 0 deletions

View File

@ -107,6 +107,12 @@ if(CMAKE_CROSSCOMPILING)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH) SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM BOTH)
endif(CMAKE_CROSSCOMPILING) endif(CMAKE_CROSSCOMPILING)
find_program(CCACHE ccache)
if(CCACHE AND WITH_CCACHE)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
endif(CCACHE AND WITH_CCACHE)
include(GetGitRevisionDescription) include(GetGitRevisionDescription)
git_get_exact_tag(GIT_REVISION --tags --always) git_get_exact_tag(GIT_REVISION --tags --always)

View File

@ -128,6 +128,7 @@ option(WITH_DEBUG_XV "Print XVideo debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_RINGBUFFER "Enable Ringbuffer debug messages" ${DEFAULT_DEBUG_OPTION}) option(WITH_DEBUG_RINGBUFFER "Enable Ringbuffer debug messages" ${DEFAULT_DEBUG_OPTION})
option(WITH_DEBUG_SYMBOLS "Pack debug symbols to installer" OFF) option(WITH_DEBUG_SYMBOLS "Pack debug symbols to installer" OFF)
option(WITH_CCACHE "Use ccache support if available" ON)
if(ANDROID) if(ANDROID)
include(ConfigOptionsAndroid) include(ConfigOptionsAndroid)