-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Use ccache if available #6085
Use ccache if available #6085
Conversation
Would love to see merged in master: this speeds-up a lot frequent package reconstructions for distributions such as ArchLinux (package qgis-git) :) |
Any news? |
Thanks ! |
@lbartoletti , @mhugent , I had to delete my .ccache folder after these errors showed up:
|
if(CCACHE_FOUND) | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) | ||
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) | ||
endif(CCACHE_FOUND) |
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.
@lbartoletti we have very long build time on Travis, I wonder if this is the origin. Do you think it might conflict with the fact that ccache
was already set here in the Dockerfile:
ENV CC=/usr/lib/ccache/clang
ENV CXX=/usr/lib/ccache/clang++
ping @m-kuhn
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.
not sure what's going on. maybe we should clean the cache on travis and start over with a clean one? and if that doesn't help add an option to disable this logic?
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.
@3nids already tried that earlier today - no change unfortunately
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.
(clearing the cache that is)
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.
opened a PR to revert and check if this really is the responsible commit #6741
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.
Not sure about it. I haven't errors at home ( c ).
But if it conflicts, you can use the second option as mentioned in my PR:
option(USE_CCACHE "Use ccache" OFF)
if (USE_CCACHE)
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
endif()
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.
thanks @lbartoletti and @m-kuhn
I merged #6745, it makes no harm to have this option anyway.
I will clean Travis cache once more to start from scratch again.
Description
What do you think about adding ccache directly if it is found?
An alternative is:
Checklist
fixes #11111
in the commit message next to the description[FEATURE]
in the commit message[needs-docs]
in the commit message and containt sufficient information in the commit message to be documentedscripts/prepare-commit.sh
script before each commit