Skip to content

Set CCACHE_BASEDIR when using ccache - #10378

Open
svenklemm wants to merge 1 commit into
mainfrom
sven/ccache_basedir
Open

Set CCACHE_BASEDIR when using ccache#10378
svenklemm wants to merge 1 commit into
mainfrom
sven/ccache_basedir

Conversation

@svenklemm

Copy link
Copy Markdown
Member

Set CCACHE_BASEDIR to the source root so ccache rewrites absolute paths
to be relative. This lets different checkouts/worktrees of the same commit
share cache entries.

@github-actions

Copy link
Copy Markdown

@kpan2034, @dbeck: please review this pull request.

Powered by pull-review

@codecov

codecov Bot commented Jul 31, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Set CCACHE_BASEDIR to the source root so ccache rewrites absolute paths
to be relative. This lets different checkouts/worktrees of the same commit
share cache entries.
@svenklemm
svenklemm force-pushed the sven/ccache_basedir branch from e0c8b64 to 147b8b3 Compare July 31, 2026 20:37

@akuzm akuzm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember this option was problematic, and their own docs call it a "brittle hack". Let's not do this unconditionally in project-wide cmake. Isn't it trivial to set locally?

reference: https://ccache.dev/manual/latest.html#config_base_dir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants