Merge pull request #1436 from karl-lunarg/karl-ccache

build: Add ccache option to CMake config
This commit is contained in:
John Kessenich 2018-07-18 20:39:31 -07:00 committed by GitHub
commit 5d6b567950
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,14 @@ if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT AND WIN32)
set(CMAKE_INSTALL_PREFIX "install" CACHE STRING "..." FORCE)
endif()
option(USE_CCACHE "Use ccache" OFF)
if(USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif(CCACHE_FOUND)
endif()
project(glslang)
# make testing optional
include(CTest)