Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix: actually use ccache binary returned by find_program #184

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

mhx
Copy link
Contributor

@mhx mhx commented Oct 18, 2024

The original code assumed that if find_program found ccache, then ccache must be in the PATH. However, find_program searches in a lot of different places. This can lead to situations where ccache is found, but the compile will fail because it's not in the path.

This change also uses CMAKE_XXX_COMPILER_LAUNCHER instead of RULE_LAUNCH_COMPILE, as the latter is for internal use only per the CMake docs.

The original code assumed that if `find_program` found `ccache`,
then `ccache` must be in the `PATH`. However, `find_program`
searches in a lot of different places. This can lead to situations
where `ccache` is found, but the compile will fail because it's
not in the path.

This change also uses `CMAKE_XXX_COMPILER_LAUNCHER` instead of
`RULE_LAUNCH_COMPILE`, as the latter is for internal use only
per the CMake docs.
Copy link
Owner

@jeremy-rifkin jeremy-rifkin left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to fix this! This is much more correct than what it was previously.

@jeremy-rifkin jeremy-rifkin merged commit 124dba5 into jeremy-rifkin:main Oct 21, 2024
78 of 79 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants