Permalink
Browse files

ADD: enable ccache when detected

Summary:
-Dramatically and safely improve the speed of C/C++ recompiles by utilizing ccache when detected.  Very helpful after a 'make clean', when changing between release and debug builds, or when maintaining builds in multiple directories.  Caches can also be shared locally or via NFS for environments with multiple developers.

ccache: https://ccache.samba.org/
Closes #7119

Reviewed By: Orvid

Differential Revision: D3366778

fbshipit-source-id: dfc4785e5692401b783d092830f23e4747850cca
  • Loading branch information...
apeabody authored and Hhvm Bot committed Jun 1, 2016
1 parent d32eaae commit fe0117f114e8ded87d8970e24aa96077132e41a2
Showing with 8 additions and 0 deletions.
  1. +8 −0 CMakeLists.txt
View
@@ -41,6 +41,14 @@ IF(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
MESSAGE(FATAL_ERROR "HHVM requires a 64bit OS")
ENDIF()
# If available, configure CCache
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
message(STATUS "Found ccache, enabling")
endif(CCACHE_FOUND)
# 3rd party library
IF(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/third-party/CMakeLists.txt")
MESSAGE(FATAL_ERROR "third-party/CMakeLists.txt missing. "

0 comments on commit fe0117f

Please sign in to comment.