ITK/Release 4/Wrapping/ccache: Difference between revisions

From KitwarePublic
< ITK‎ | Release 4‎ | Wrapping
Jump to navigationJump to search
(Created page with "= Using CCache for WrapITK = Using CCache[http://ccache.samba.org] to build WrapITK can improve the build times considerably. Install ccache with Macports. The Macports installa...")
 
Line 1: Line 1:
= Using CCache for WrapITK =
= Using CCache for WrapITK =
Using CCache[http://ccache.samba.org] to build WrapITK can improve the build times considerably.  
Using CCache[http://ccache.samba.org] to build WrapITK can improve the build times considerably. For all unix systems (including MacOS X), ccache is enabled by creating symbolic links to the g++/gcc compiler:
Install ccache with Macports. The Macports installation would automatically creates the symbolic links to g++/cc compilers and put them in the directory /opt/local/libexec/ccache. The only remaining thing needed is to add this directory to the PATH variable (alternatively you can add it to the .bash_profile or .profile in home directory)
ln -s /usr/bin/ccache /usr/local/bin/g++
ln -s /usr/bin/ccache /usr/local/bin/gcc
Alternatively, on MacOS X, Install ccache with Macports. The Macports installation would automatically creates the symbolic links to g++/cc compilers and put them in the directory /opt/local/libexec/ccache. The only remaining thing needed is to add this directory to the PATH variable (alternatively you can add it to the .bash_profile or .profile in home directory)
  $ sudo port install ccache
  $ sudo port install ccache
  $ export PATH= /opt/local/libexec/ccache:$PATH
  $ export PATH= /opt/local/libexec/ccache:$PATH
All the subsequent builds of WrapITK would use ccache and we can see a speedup of as much as 40 minutes for repeated invocations.
All the subsequent builds of WrapITK would use ccache and we can see a speedup of as much as 40 minutes for repeated invocations.

Revision as of 21:44, 22 March 2011

Using CCache for WrapITK

Using CCache[1] to build WrapITK can improve the build times considerably. For all unix systems (including MacOS X), ccache is enabled by creating symbolic links to the g++/gcc compiler:

ln -s /usr/bin/ccache /usr/local/bin/g++
ln -s /usr/bin/ccache /usr/local/bin/gcc

Alternatively, on MacOS X, Install ccache with Macports. The Macports installation would automatically creates the symbolic links to g++/cc compilers and put them in the directory /opt/local/libexec/ccache. The only remaining thing needed is to add this directory to the PATH variable (alternatively you can add it to the .bash_profile or .profile in home directory)

$ sudo port install ccache
$ export PATH= /opt/local/libexec/ccache:$PATH

All the subsequent builds of WrapITK would use ccache and we can see a speedup of as much as 40 minutes for repeated invocations.