Adds ccache to build
This is mostly for fun and because I want to see how it works in travis.
This commit is contained in:
parent
f9443b1468
commit
a4df4c6079
|
@ -1,6 +1,7 @@
|
|||
sudo: required
|
||||
dist: trusty
|
||||
language: c
|
||||
cache: ccache
|
||||
compiler:
|
||||
- gcc
|
||||
- clang
|
||||
|
|
|
@ -9,6 +9,7 @@ include(cmake/FindSDL2.cmake)
|
|||
include(cmake/FindSDL2_image.cmake)
|
||||
include(cmake/FindSDL2_ttf.cmake)
|
||||
include(cmake/FindSDL2_mixer.cmake)
|
||||
include(cmake/FindCCache.cmake)
|
||||
|
||||
if (NOT WIN32)
|
||||
include(FindX11)
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# FindCCache
|
||||
# ----------
|
||||
# Finds ccache and sets it up as compiler wrapper.
|
||||
# This should ideally be called before the call to project().
|
||||
#
|
||||
# See: https://crascit.com/2016/04/09/using-ccache-with-cmake/
|
||||
|
||||
find_program(CCACHE_PROGRAM ccache)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(CCache REQUIRED_VARS CCACHE_PROGRAM)
|
||||
|
||||
if(CCACHE_FOUND)
|
||||
# Supports Unix Makefiles and Ninja
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}")
|
||||
endif()
|
Loading…
Reference in New Issue