cmake: Search for sccache too in CCache module

sccache is a ccache rewrite that supports GCC, Clang and MSVC.
This commit is contained in:
Florent Castelli 2017-06-15 18:23:30 +02:00 committed by Léo Lam
parent 18e84361d9
commit 712b078a5b
No known key found for this signature in database
GPG Key ID: 0DF30F9081000741
1 changed files with 1 additions and 2 deletions

View File

@ -1,7 +1,6 @@
find_program(CCACHE_BIN ccache) find_program(CCACHE_BIN NAMES ccache sccache)
if(CCACHE_BIN) if(CCACHE_BIN)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_BIN}) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_BIN})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_BIN})
# ccache uses -I when compiling without preprocessor, which makes clang complain. # ccache uses -I when compiling without preprocessor, which makes clang complain.
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")