diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt index d47ac3ccffd05..c690acc27fa74 100644 --- a/llvm/CMakeLists.txt +++ b/llvm/CMakeLists.txt @@ -276,7 +276,7 @@ if(LLVM_CCACHE_BUILD) set(LLVM_CCACHE_PARAMS "CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros" CACHE STRING "Parameters to pass through to ccache") - if(NOT CMAKE_SYSTEM_NAME MATCHES "Windows") + if(NOT CMAKE_HOST_WIN32) set(CCACHE_PROGRAM "${LLVM_CCACHE_PARAMS} ${CCACHE_PROGRAM}") if (LLVM_CCACHE_MAXSIZE) set(CCACHE_PROGRAM "CCACHE_MAXSIZE=${LLVM_CCACHE_MAXSIZE} ${CCACHE_PROGRAM}")