From f5a3bbbddad33cb0bc0ffe16985f012eb159b5d8 Mon Sep 17 00:00:00 2001 From: S David <2100425+s-daveb@users.noreply.github.com> Date: Sat, 25 May 2024 09:51:12 -0400 Subject: [PATCH] Set RULE_LAUNCH_COMPILE to detected ccache absolute path. This should fix a build issue on systems that install ccache to /usr/local/ or /opt/homebrew/ and don't include that path in non-interactive shells spawned by subprocesses. --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c5add8239..b5287f8dd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -947,9 +947,9 @@ if (LLAMA_LTO) endif() if (LLAMA_CCACHE) - find_program(LLAMA_CCACHE_FOUND ccache) - if (LLAMA_CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + find_program(LLAMA_CCACHE_PATH ccache) + if (LLAMA_CCACHE_PATH) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${LLAMA_CCACHE_PATH}) set(ENV{CCACHE_SLOPPINESS} time_macros) message(STATUS "ccache found, compilation results will be cached. Disable with LLAMA_CCACHE=OFF.") else()