ccache[1] works for me.
Of course, if you're rebuilding the same code over and over it can be a net win, but -in the comments- it is mentioned that the obvious things -that one might end up doing somewhat frequently in C/C++ development- invalidate the cache.