title: How to use ccache selectively?
body: <p>I have to compile multiple versions of an app written in C++ and I think to use ccache for speeding up the process.</p>
  
  <p>ccache howtos have examples which suggest to create symlinks named gcc, g++ etc and make sure they appear in PATH before the original gcc binaries, so ccache is used instead.</p>
  
  <p>So far so good, but I'd like to use ccache only when compiling this particular app, not always.</p>
  
  <p>Of course, I can write a shell script that will try to create these symlinks every time I want to compile the app and will delete them when the app is compiled. But this looks like filesystem abuse to me.</p>
  
  <p>Are there better ways to use ccache selectively, not always?</p>
  
  <p>For compilation of a single source code file, I could just manually call ccache instead of gcc and be done, but I have to deal with a complex app that uses an automated build system for multiple source code files.</p>