| Summary: | Suggestion: Add ccache to the CMake build to speed up compile time when developing | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Linus Probert <linus.probert> |
| Component: | build | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus, linus.probert, sezeroz |
| Version: | don't know | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
Use ccache for cmake build if it's available.
Patch with and option to enable ccache |
||
This might be interesting for some, but for me I'd like to have a way to not use it if this gets accepted (something other than `yum remove ccache` of course.) If this is up for acceptance I can add an opt-in/opt-out flag to the script so that it remains optional. Not my decision. (I just wrote that, because, as you can guess I don't like ccache :)) Your request makes sense, it's silly to force stuff on people. Yes, can you add a way to make it optional? Thanks! Created attachment 3437 [details]
Patch with and option to enable ccache
Uploaded patch that includes an option for ccache in CMakeLists.txt
(In reply to Linus Probert from comment #6) > Created attachment 3437 [details] > Patch with and option to enable ccache > > Uploaded patch that includes an option for ccache in CMakeLists.txt Fwiw, with CMake 3.4 and later, you can do this... cmake -DCMAKE_C_COMPILER_LAUNCHER=ccache ...and it'll use ccache when building SDL. Considering that, I don't think we need to patch this into SDL's project files. --ryan. Oh, cool. That was new knowledge to me. That makes this patch super redundant (In reply to Linus Probert from comment #8) > Oh, cool. That was new knowledge to me. That makes this patch super redundant We appreciate that you took the time to work on it, though! --ryan. |
Created attachment 3380 [details] Use ccache for cmake build if it's available. Perhaps it just me but I like to use CCache when developing because it has a great impact on compile time for repeated builds during development. It would be nice if SDL would use this if available. Attaching a patch.