Added support ccache for speedup compilation on Linux#2267
Conversation
cdavis5e
left a comment
There was a problem hiding this comment.
Historically, CMake build systems that use ccache(1) automatically have caused problems for me, e.g. when installing ports from source in MacPorts. Then again, I suppose it's easy enough to work around that with -DCCACHE_FOUND=NO.
|
|
||
| find_program(CCACHE_FOUND ccache) | ||
| if (CCACHE_FOUND) | ||
| set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) |
There was a problem hiding this comment.
After the find_program() above, the variable CCACHE_FOUND will contain the full pathname of the ccache program. You should probably use it, instead of assuming that ccache will be in the user's PATH.
|
Is there really a point adding this? This isn't a massive project where ccache really helps. At the very least, it should be opt-in, not enabled by default. |
|
|
@HansKristian-Work more information:
https://ccache.dev/
https://en.wikipedia.org/wiki/Ccache