[ccache] how to use ccache

Francois Marier francois at debian.org
Wed Dec 5 08:17:53 GMT 2007


On 2007-12-04 at 23:41:16, Mahmood NT wrote:
> This make file is a little bit long. First, one question? Is ccache
> dependant on makefile. This is not good....

Well, it is dependent on users configuring their system to compile with
ccache.  Normally, this happen automatically when you use the symlink trick
I wrote about earlier.

In this case, however, your makefile is explicitely requesting a specific
compiler:

> CGAL_CXX = /usr/bin/g++

If you want to use ccache, you need to either:

1- change this to point to g++ without the path, and rely on the symlinks to
   pick up /usr/bin/ccache instead of /usr/bin/g++

2- change this variable to invoke g++ through ccache:

  CGAL_CXX = /usr/bin/ccache /usr/bin/g++

Both of these methods are described in more details in the ccache manpage.
 
Francois


More information about the ccache mailing list