-
Notifications
You must be signed in to change notification settings - Fork 3
ccache: new binary recipe #2
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
base: main
Are you sure you want to change the base?
Conversation
ded1e7e
to
f815600
Compare
f815600
to
6f6a37f
Compare
Have you successfully tested this with Windows+CMake+MSVC+Debug/RelWithDebInfo? Because in my tests this does not work. ccache does not cache anything, cause ccache/ccache#1040 You need to change the debug info type:
https://github.com/ccache/ccache/wiki/MS-Visual-Studio However, at least in our case, changing this is not acceptable. We build RelWithDebInfo, but do not want to distribute debug info. And splitting, like with gcc/elf is not possible AFAIK. |
def package_info(self): | ||
self.cpp_info.libdirs = [] | ||
self.cpp_info.includedirs = [] | ||
if self.conf.get("user.ccache:auto_inject", default=True, check_type=bool): |
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.
Why is this a new remote/repo/recipe? Why can't we integrate that in the regular ccache (conan-center) recipe? What is different if auto_inject=False (default)?
if can_run(self): | ||
self.run("ccache --version", env="conanbuild") | ||
self.run("ccache --get-config hash_dir", env="conanbuild") | ||
self.run("ccache --get-config base_dir", env="conanbuild") |
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.
You can also verify that ccache works:
In the test project, change the cache_dir (CCACHE_DIR) to a temporary, clean dir. Then after build, verify that the cache has 1 entry (ccache -s)
Credits: https://github.com/mradugin/cmake-findccache/blob/47c20441ce923d1751faf104d1914204acdd31d7/
TODO