Skip to content

Commit a962588

Browse files
ochafikjoelvaneenwyk
authored andcommitted
ci: use sccache on windows instead of ccache (llama/11545)
* Use sccache on ci for windows * Detect sccache in cmake
1 parent efebba7 commit a962588

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

ggml/src/CMakeLists.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,18 @@ endif()
9393

9494
if (GGML_CCACHE)
9595
find_program(GGML_CCACHE_FOUND ccache)
96+
find_program(GGML_SCCACHE_FOUND sccache)
9697

97-
if (GGML_CCACHE_FOUND)
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()
98104
# TODO: should not be set globally
99-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
105+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${GGML_CCACHE_VARIANT}")
100106
set(ENV{CCACHE_SLOPPINESS} time_macros)
101-
message(STATUS "ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
107+
message(STATUS "${GGML_CCACHE_VARIANT} found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
102108
else()
103109
message(STATUS "Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF")
104110
endif ()

0 commit comments

Comments
 (0)