Olivier Chafik commited on
Commit
9ed1962
·
1 Parent(s): 72c425b

`ci`: use sccache on windows instead of ccache (llama/11545)

Browse files

* Use sccache on ci for windows

* Detect sccache in cmake

Files changed (1) hide show
  1. ggml/src/CMakeLists.txt +9 -3
ggml/src/CMakeLists.txt CHANGED
@@ -93,12 +93,18 @@ endif()
93
 
94
  if (GGML_CCACHE)
95
  find_program(GGML_CCACHE_FOUND ccache)
 
96
 
97
- if (GGML_CCACHE_FOUND)
 
 
 
 
 
98
  # TODO: should not be set globally
99
- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
100
  set(ENV{CCACHE_SLOPPINESS} time_macros)
101
- message(STATUS "ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
102
  else()
103
  message(STATUS "Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF")
104
  endif ()
 
93
 
94
  if (GGML_CCACHE)
95
  find_program(GGML_CCACHE_FOUND ccache)
96
+ find_program(GGML_SCCACHE_FOUND sccache)
97
 
98
+ if (GGML_CCACHE_FOUND OR GGML_SCCACHE_FOUND)
99
+ if(GGML_CCACHE_FOUND)
100
+ set(GGML_CCACHE_VARIANT ccache)
101
+ else()
102
+ set(GGML_CCACHE_VARIANT sccache)
103
+ endif()
104
  # TODO: should not be set globally
105
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${GGML_CCACHE_VARIANT}")
106
  set(ENV{CCACHE_SLOPPINESS} time_macros)
107
+ message(STATUS "${GGML_CCACHE_VARIANT} found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
108
  else()
109
  message(STATUS "Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF")
110
  endif ()