Skip to content

Commit

Permalink
ADD: enable ccache when detected
Browse files Browse the repository at this point in the history
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 fe0117f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down

0 comments on commit fe0117f

Please sign in to comment.