Skip to content

Commit 1e871bc

Browse files
committed
CMake: Allow specifying arbitrary CCACHE parameters
Introduces the LLVM_CCACHE_PARAMS cmake variable, which can be used to pass arbitrary parameters to ccache invocations. llvm-svn: 324779
1 parent db1916a commit 1e871bc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

llvm/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,10 @@ if(LLVM_CCACHE_BUILD)
144144
if(CCACHE_PROGRAM)
145145
set(LLVM_CCACHE_MAXSIZE "" CACHE STRING "Size of ccache")
146146
set(LLVM_CCACHE_DIR "" CACHE STRING "Directory to keep ccached data")
147-
set(CCACHE_PROGRAM "CCACHE_CPP2=yes CCACHE_HASHDIR=yes ${CCACHE_PROGRAM}")
147+
set(LLVM_CCACHE_PARAMS "CCACHE_CPP2=yes CCACHE_HASHDIR=yes"
148+
CACHE STRING "Parameters to pass through to ccache")
149+
150+
set(CCACHE_PROGRAM "${LLVM_CCACHE_PARAMS} ${CCACHE_PROGRAM}")
148151
if (LLVM_CCACHE_MAXSIZE)
149152
set(CCACHE_PROGRAM "CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${CCACHE_PROGRAM}")
150153
endif()
@@ -1022,4 +1025,3 @@ endif()
10221025
if (MSVC AND CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
10231026
include(InstallRequiredSystemLibraries)
10241027
endif()
1025-

0 commit comments

Comments
 (0)