Commit 4901ffd5 by Ben Clayton

CMakeLists: Use ccache if found

Dramatically speeds up builds when switching build flags. Change-Id: I661d18458db69f6663381c252b06b3ed96f3a5c6 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/33472Tested-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
parent 2e5d5b46
......@@ -62,6 +62,14 @@ if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQ
"host compiler, pass -Thost=x64 on the CMake command line.")
endif()
# Use CCache if available
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
message(STATUS "Using ccache")
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
###########################################################
# Options
###########################################################
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment