[Cmake] pb when CC="ccache gcc" (on linux)
Fabrice Bellet
Fabrice Bellet <fabrice@bellet.info>
Fri, 21 Feb 2003 18:18:24 +0100
On Fri, Feb 21, 2003 at 12:00:19PM -0500, Brad King wrote:
> > I can no longer use the CC and CXX environment variables with a compiler
> > name being splitted in several words. This is typically useful when
> > using a cache compiler, like http://ccache.samba.org. You define your
> > compiler name as CC="ccache gcc".
>
> Try setting
>
> CC=ccache
> CXX=ccache
> CFLAGS=gcc
> CXXFLAGS=g++
It doesn't work, because CC and CFLAGS are not always contiguously expanded,
for example in configure:
${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5
As a workaround, I could use symlinks like explained in the ccache manual,
and use this linked gcc in my CC :
cp ccache /usr/local/bin/
ln -s /usr/local/bin/ccache /usr/local/bin/gcc
ln -s /usr/local/bin/ccache /usr/local/bin/cc
--
fabrice