Skip to content

Commit

Permalink
build: add ccache option to envoy build (#380)
Browse files Browse the repository at this point in the history
At least on my machine, ccache set via CC and CXX env variables is no
longer working and breaks the boringssl build. This allows ccache to
be turned on via cmake for the envoy code only.
  • Loading branch information
mattklein123 authored Jan 26, 2017
1 parent eab299d commit b7416ac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,14 @@ endif()

option(ENVOY_STRIP "strip symbols from binaries" OFF)

option(ENVOY_USE_CCACHE "build with ccache" OFF)
if (ENVOY_USE_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)
endif()
endif()

set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${ENVOY_COTIRE_MODULE_DIR}")
include(cotire)

0 comments on commit b7416ac

Please sign in to comment.