[SYCL] Fix build on Windows when ccache enabled (#9954)

This commit is contained in:
蕭澧邦 2024-10-21 16:53:33 +08:00 committed by GitHub
parent 55e47786e3
commit 8c7c04e896
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1068,7 +1068,11 @@ if (GGML_CCACHE)
if (GGML_CCACHE_FOUND) if (GGML_CCACHE_FOUND)
# TODO: should not be set globally # TODO: should not be set globally
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) if (GGML_SYCL)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "ccache compiler_type=clang-cl")
else ()
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
endif ()
set(ENV{CCACHE_SLOPPINESS} time_macros) set(ENV{CCACHE_SLOPPINESS} time_macros)
message(STATUS "ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.") message(STATUS "ccache found, compilation results will be cached. Disable with GGML_CCACHE=OFF.")
else() else()