Browse Source

cmake use ccache if found and not disabled

sbg
Daniel Agar 7 years ago
parent
commit
33266ef2c8
  1. 6
      CMakeLists.txt

6
CMakeLists.txt

@ -243,11 +243,11 @@ set(BUILD_SHARED_LIBS OFF) @@ -243,11 +243,11 @@ set(BUILD_SHARED_LIBS OFF)
#=============================================================================
# ccache
#
option(CCACHE "Use ccache if available" OFF)
option(CCACHE "Use ccache if available" ON)
find_program(CCACHE_PROGRAM ccache)
if (CCACHE AND CCACHE_PROGRAM)
message(STATUS "Enabled ccache: ${CCACHE_PROGRAM}")
if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
else()
endif()
#=============================================================================

Loading…
Cancel
Save