ITK/Release 4/Wrapping/ccache: Difference between revisions
From KitwarePublic
Jump to navigationJump to search
Line 3: | Line 3: | ||
ln -s /usr/bin/ccache /usr/local/bin/g++ | ln -s /usr/bin/ccache /usr/local/bin/g++ | ||
ln -s /usr/bin/ccache /usr/local/bin/gcc | ln -s /usr/bin/ccache /usr/local/bin/gcc | ||
Alternatively, on MacOS X, Install ccache with Macports. The Macports installation would automatically create the symbolic links to g++/gcc compilers and put them in the directory /opt/local/libexec/ccache. The only remaining thing | Alternatively, on MacOS X, Install ccache with Macports. The Macports installation would automatically create the symbolic links to g++/gcc compilers and put them in the directory /opt/local/libexec/ccache. The only remaining thing then 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:45, 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 create the symbolic links to g++/gcc compilers and put them in the directory /opt/local/libexec/ccache. The only remaining thing then 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.