[llvm] r323357 - Fix up and document controlling ccache via CMake options.
Paul Robinson via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 24 10:15:08 PST 2018
Author: probinson
Date: Wed Jan 24 10:15:08 2018
New Revision: 323357
URL: http://llvm.org/viewvc/llvm-project?rev=323357&view=rev
Log:
Fix up and document controlling ccache via CMake options.
Patch by Matthew Davis!
Differential Revision: https://reviews.llvm.org/D41757
Modified:
llvm/trunk/CMakeLists.txt
llvm/trunk/docs/CMake.rst
Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=323357&r1=323356&r2=323357&view=diff
==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Wed Jan 24 10:15:08 2018
@@ -137,11 +137,11 @@ set(LLVM_CCACHE_BUILD OFF CACHE BOOL "Se
if(LLVM_CCACHE_BUILD)
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
- set(LLVM_CCACHE_SIZE "" CACHE STRING "Size of ccache")
+ set(LLVM_CCACHE_MAXSIZE "" CACHE STRING "Size of ccache")
set(LLVM_CCACHE_DIR "" CACHE STRING "Directory to keep ccached data")
set(CCACHE_PROGRAM "CCACHE_CPP2=yes CCACHE_HASHDIR=yes ${CCACHE_PROGRAM}")
- if (LLVM_CCACHE_SIZE)
- set(CCACHE_PROGRAM "CCACHE_SIZE=${LLVM_CCACHE_SIZE} ${CCACHE_PROGRAM}")
+ if (LLVM_CCACHE_MAXSIZE)
+ set(CCACHE_PROGRAM "CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${CCACHE_PROGRAM}")
endif()
if (LLVM_CCACHE_DIR)
set(CCACHE_PROGRAM "CCACHE_DIR=${LLVM_CCACHE_DIR} ${CCACHE_PROGRAM}")
Modified: llvm/trunk/docs/CMake.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CMake.rst?rev=323357&r1=323356&r2=323357&view=diff
==============================================================================
--- llvm/trunk/docs/CMake.rst (original)
+++ llvm/trunk/docs/CMake.rst Wed Jan 24 10:15:08 2018
@@ -551,6 +551,14 @@ LLVM-specific variables
<http://clang.llvm.org/docs/SourceBasedCodeCoverage.html>`_ instrumentation
is enabled while building llvm.
+**LLVM_CCACHE_BUILD**:BOOL
+ If enabled and the ``ccache`` program is available, then LLVM will be
+ built using ``ccache`` to speed up rebuilds of LLVM and its components.
+ Defaults to OFF. The size and location of the cache maintained
+ by ``ccache`` can be adjusted via the LLVM_CCACHE_MAXSIZE and LLVM_CCACHE_DIR
+ options, which are passed to the CCACHE_MAXSIZE and CCACHE_DIR environment
+ variables, respectively.
+
CMake Caches
============
More information about the llvm-commits
mailing list