-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: Simplify ccache logic #577
Conversation
diizzyy
commented
Mar 31, 2024
- Use USE_CCACHE switch, this seems to be a more common option having a quick look using Google
- Make use of find_program() functionality introduced in CMake 3.18 to simplify code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DDG doesn't turn up a single hit for USE_CCACHE
but G apparently finds some.
This rename falls under API breakage IMO, i.e. it must be backported to 1.3 and a warning must be added that it will change in the future.
This PR doesn't only simplify code, but also changes behavior.
I don't like the functionality change where the old solution defaults to enable its usage if ccache
is found and with your change it's disabled by default. As there was no comment describing why this was done, I suspect that this was accidental!?
Also: please fix CI :)
I think the "most" correct way would be to rip it out completely and leave it up to the user compiling it or the framework to specify rather than blindly looking for a binary. https://stackoverflow.com/questions/1815688/how-to-use-ccache-with-cmake I can go either way :) |
Thanks, that's exactly what we should do. Do you wanna modify this PR to simply drop it or should I? |
I'll update the PR, thanks! :) |
Rely on CMAKE_C_COMPILER_LAUNCHER instead of homegrown logic See CMake's documentation for more information https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_COMPILER_LAUNCHER.html
Updated |
- remove built-in ccache detection, see libtom/libtommath#577 - put OPTIMIZED_CFLAGS and LTO in OPTIONS, on by default PR: 278155 Reported by: diizzy
"Backported" via 5410d0b |