1
0
Fork 0

make ccache optional (#10310)

This commit is contained in:
Frank Celler 2019-10-24 10:58:40 +02:00 committed by GitHub
parent b124113190
commit 1a83aaa43a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -52,11 +52,15 @@ endif()
### setup ccache
################################################################################
find_program(CCACHE_FOUND ccache)
option(USE_CCACHE "Use CCACHE if present" ON)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif(CCACHE_FOUND)
if (USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif(CCACHE_FOUND)
endif()
if (USE_OPTIMIZE_FOR_ARCHITECTURE)
include(OptimizeForArchitecture)