Skip to content

Commit 02f596b

Browse files
PatTheMavRytoEX
authored andcommitted
ci: Limit use of Ccache option to enforce second preprocessor call
Feature was removed in Ccache 4.12, which is provided by Homebrew by default since 2025-10-19.
1 parent cf5ef3e commit 02f596b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/scripts/utils.zsh/setup_ccache

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
autoload -Uz log_debug log_warning
1+
autoload -Uz is-at-least log_debug log_warning
22

33
if (( ${+commands[ccache]} )) {
44
log_debug "Found ccache at ${commands[ccache]}"
55

6-
ccache --set-config=run_second_cpp=true
6+
local ccache_version=$(ccache --version | head -1 | cut -d ' ' -f 3)
7+
if ! is-at-least 4.12 ${ccache_version}; then
8+
ccache --set-config=run_second_cpp=true
9+
fi
10+
711
ccache --set-config=direct_mode=true
812
ccache --set-config=inode_cache=true
913
ccache --set-config=compiler_check=content

0 commit comments

Comments
 (0)