There is very little documentation on enabling ccache
on GNU/Linux. Here is a response from launchpad.net:
At the moment, I think the best way to enable ccache is to add "/usr/lib/ccache" to the front of your path. If you want to enable it for all users by default, change the PATH variable in /etc/environment.
Can someone give me more information on enabling ccache
?
The ccache manual has a section called Run modes which describes the official ways of activating ccache, so I suggest reading the manual.
Also, as you already noted, Linux distributions often set up a /usr/lib/ccache directory which is designed to be prepended to PATH.
After Downloading, Follow the steps as mentioned below:
A) Tar the file using the following command :
$tar -xvf ccache-3.2.4.tar.bz2
Note : I'm using ccache 3.2.4 Version.You can download the latest one.
B) Go inside ccache-3.2.4 folder and run the following commands:
$./configure
$./make
$ sudo make install
C) Go to your .bashrc and insert the following :
export CCACHE_DIR=/home/user_name/.ccache
export CCACHE_TEMPDIR=/home/user_name/.ccache
Note : Fill user_name with your User Name
D) Save your Bashrc and source it
$ source ~/.bashrc
E) To check ccache is working or not type :
ccache -M 10G : To Set the ccache Size to 10GB
F) To check ccache is working or not type :
ccache -s : To check ccache statistics
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With