[CMake] cmake 2.2.0 and 'ccache'

Filipe Sousa filipe at ipb.pt
Tue Jul 19 06:58:20 EDT 2005


On Tuesday 19 July 2005 10:49, Joel Schaerer wrote:
> Eddy Pronk wrote:
> > I tried to use CMake 2.2.0b in the OpenEmbedded tree.
> > It defines CC = 'ccache gcc'.
> >
> > (see http://ccache.samba.org/)
> >
> > When CMake tests the compiler it fails.
> > Anyone tried using ccache with CMake?
> >
> > Eddy
> >
> >
> >
> >
> >
> > _______________________________________________
> > CMake mailing list
> > CMake at cmake.org
> > http://www.cmake.org/mailman/listinfo/cmake
>
> Hi,
>
> I use ccache with cmake and I find it very useful. I had problems too
> when defining the compiler, so I use the following workaround:
>
> In the CMakeLists.txt:
> SET(CMAKE_CXX_COMPILER "$(HOME)/bin/g++")
>
> and the file ~/bin/g++ is a soft link defined this way:
> g++ -> /usr/bin/ccache
>
> It's a bit ugly, but it works perfectly. Has anybody found any other
> solutions?

try
cd /usr/local/bin
ln -s /usr/bin/ccache cc
ln -s /usr/bin/ccache c++
ln -s /usr/bin/ccache gcc
ln -s /usr/bin/ccache g++

add this to /etc/profile or ${HOME}/.bashrc
export PATH=/usr/local/bin:${PATH}

That way gcc in /usr/local/bin comes first

> joel
>
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake

-- 
Filipe Sousa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/cmake/attachments/20050719/da5452a1/attachment.pgp


More information about the CMake mailing list