File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -284,14 +284,22 @@ if(LLVM_CCACHE_BUILD)
284284 set (LLVM_CCACHE_PARAMS "CCACHE_CPP2=yes;CCACHE_HASHDIR=yes"
285285 CACHE STRING "Parameters to pass through to ccache" )
286286
287- set (launcher_params ${LLVM_CCACHE_PARAMS} )
288- if (LLVM_CCACHE_MAXSIZE)
289- set (launcher_params CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${launcher_params} )
290- endif ()
291- if (LLVM_CCACHE_DIR)
292- set (launcher_params CCACHE_DIR=${LLVM_CCACHE_DIR} ${launcher_params} )
287+ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
288+ set (launcher_params ${LLVM_CCACHE_PARAMS} )
289+ if (LLVM_CCACHE_MAXSIZE)
290+ set (launcher_params CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${launcher_params} )
291+ endif ()
292+ if (LLVM_CCACHE_DIR)
293+ set (launcher_params CCACHE_DIR=${LLVM_CCACHE_DIR} ${launcher_params} )
294+ endif ()
295+ set (launcher ${launcher_params} "${CCACHE_PROGRAM} " )
296+ else ()
297+ if (LLVM_CCACHE_MAXSIZE OR LLVM_CCACHE_DIR OR
298+ NOT LLVM_CCACHE_PARAMS MATCHES "CCACHE_CPP2=yes;CCACHE_HASHDIR=yes" )
299+ message (FATAL_ERROR "Ccache configuration through CMake is not supported on Windows. Please use environment variables." )
300+ endif ()
301+ set (launcher "${CCACHE_PROGRAM} " )
293302 endif ()
294- set (launcher ${launcher_params} "${CCACHE_PROGRAM} " )
295303 else ()
296304 set (LLVM_CCACHE_PARAMS "run_second_cpp=true;hash_dir=true"
297305 CACHE STRING "Parameters to pass through to ccache" )
You can’t perform that action at this time.
0 commit comments