[Insight-users] CMake and ccache
Peter Cech
pcech at vision.ee.ethz.ch
Wed Feb 8 12:11:17 EST 2006
On Wed, Feb 08, 2006 at 17:43:01 +0100, Michael Held wrote:
> hi,
>
> since ccache (http://ccache.samba.org/) is speeding up compile time
> extremely, does anybody know how to combine CMake with ccache?
>
> I am using gcc 4.0.1 on Mac OS X 10.4.4.
Specifying 'ccache g++' as a C++ compiler should do the trick.
Alternatively, make a symlink named g++-ccache pointing to ccache
('ln -s /usr/local/bin/ccache /usr/local/bin/g++-ccache', change paths
as needed) and specify g++-ccache as a compiler for ITK and your project
(if you have ITK already installed, you can avoid recompilation by
editing compiler path in lib/InsightToolkit/ITKBuildSettings.cmake).
Do the same for C compiler (gcc) as well.
AFAIK ccache is caching preprocessed sources and that can help a lot in
C programs. With programs using ITK, compiler spends most of the time
crunching through templates and speeding up preprocessing is not likely
to give big gains. That said, you should try yourself and see.
Definitely report back if you find I'm wrong here.
Cheers,
Peter
More information about the Insight-users
mailing list