From: Jay Date: Sat, 29 Mar 2025 10:04:58 +0000 (+0800) Subject: cmake : fix ccache conflict (llama/12522) X-Git-Tag: upstream/0.0.1898~19 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=26cc855fe21ba6e30fae15e314ee105b30ae2372;p=pkg%2Fggml%2Fsources%2Fggml cmake : fix ccache conflict (llama/12522) If users already set CMAKE_C_COMPILER_LAUNCHER globally, setting it in cmake again will lead to conflict and compile fail. Signed-off-by: Jay --- diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1e4c2422..f00700da 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -65,7 +65,7 @@ if (GGML_LTO) endif() endif() -if (GGML_CCACHE) +if (GGML_CCACHE AND NOT CMAKE_C_COMPILER_LAUNCHER AND NOT CMAKE_CXX_COMPILER_LAUNCHER) find_program(GGML_CCACHE_FOUND ccache) find_program(GGML_SCCACHE_FOUND sccache)