Use of ccache with Boost
Hi, I'm using Boost on Linux however for various reasons I need to rebuild parts of it occasionally. For other C/C++-based tools that are built with autoconf/automake, I've started to use ccache (http://ccache.samba.org/) to speed up recompilation. This is done simply by setting the CC / CXX environment variables to "ccache gcc" / "ccache g++" respectively. I have had a look through the Jam documentation but I can't see an easy way to achieve the same thing when building the Boost distribution. The closest I came was a bit on the trac that simply said I can add a new toolset, but had no real instructions as to how. Thanks for any help! Tom Dalton
Dalton, Tom wrote:
Hi,
I'm using Boost on Linux however for various reasons I need to rebuild parts of it occasionally. For other C/C++-based tools that are built with autoconf/automake, I've started to use ccache (_http://ccache.samba.org/_) to speed up recompilation. This is done simply by setting the CC / CXX environment variables to "ccache gcc" / "ccache g++" respectively. I have had a look through the Jam documentation but I can't see an easy way to achieve the same thing when building the Boost distribution. The closest I came was a bit on the trac that simply said I can add a new toolset, but had no real instructions as to how.
Thanks for any help!
Tom Dalton
An alternative to setting the environment variable is to use symbolic links. E.g. in my /usr/local/bin folder, I have c++ -> /usr/bin/ccache g++ -> /usr/bin/ccache gcc -> /usr/bin/ccache Regards, Roland
2009/9/29 Dalton, Tom
I'm using Boost on Linux however for various reasons I need to rebuild parts of it occasionally. For other C/C++-based tools that are built with autoconf/automake, I've started to use ccache (http://ccache.samba.org/) to speed up recompilation. This is done simply by setting the CC / CXX environment variables to "ccache gcc" / "ccache g++" respectively. I have had a look through the Jam documentation but I can't see an easy way to achieve the same thing when building the Boost distribution. The closest I came was a bit on the trac that simply said I can add a new toolset, but had no real instructions as to how.
Create a file called 'user-config.jam' in your home directory, containing something like: using gcc : : ccache g++ ; Or possibly with the version number: using gcc : 4.4 : ccache g++-4.4 ; For more information see: http://www.boost.org/doc/libs/1_40_0/doc/html/bbv2/advanced.html#bbv2.advanc... Daniel
Daniel and Roland,
Thanks guys, that gives me some good avenues to explore.
Tom
-----Original Message-----
From: boost-users-bounces@lists.boost.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Daniel James
Sent: 29 September 2009 16:07
To: boost-users@lists.boost.org
Subject: Re: [Boost-users] Use of ccache with Boost
2009/9/29 Dalton, Tom
I'm using Boost on Linux however for various reasons I need to rebuild
parts of it occasionally. For other C/C++-based tools that are built with autoconf/automake, I've started to use ccache (http://ccache.samba.org/) to speed up recompilation. This is done simply by setting the CC / CXX environment variables to "ccache gcc" /
"ccache g++" respectively. I have had a look through the Jam documentation but I can't see an easy way to achieve the same thing when building the Boost distribution. The closest I came was a bit on the trac that simply said I can add a new toolset, but had no real instructions as to how.
Create a file called 'user-config.jam' in your home directory, containing something like: using gcc : : ccache g++ ; Or possibly with the version number: using gcc : 4.4 : ccache g++-4.4 ; For more information see: http://www.boost.org/doc/libs/1_40_0/doc/html/bbv2/advanced.html#bbv2.ad vanced.configuration Daniel _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
Dalton, Tom
-
Daniel James
-
Roland Bock