Build systems like Make or Ninja should be able to handle the dependencies and re-compile only the part affected by changes. Then why ccache helps?
I understand that ccache and build systems work in different ways. ccache looks into the file content while build systems only care about files. So change a file and change it back, ccache works, sure, but I assume that is not the main use case? And similarly it works after make clean && make
.
But is there a case that ccache really solves the problem that build systems can't handle? Like the same file is really compiled many times in a project? Or a case where build systems cannot resolve the dependencies and decide to re-compile every time? Real world use cases are preferred. Thanks in advance :)