[CMake] CMake and distcc

Rodolfo Lima rodolfo at rodsoft.org
Wed Jan 16 16:04:36 EST 2008


Hi, I've been using distcc to be able to use a compiler farm here at
work. There are a bunch of linux boxes, some are i686-pc-linux-gnu,
others i386-pc-linux-gnu, x86_64-pc-linux-gnu, etc.

The problem is that normally cmake chooses /usr/bin/gcc as the compiler.
Once it gets chosen, distcc invokes the default compiler of each box.
Since they have different machines (amd64,i686,...), things go awry.

One solution would be if cmake picked the complete name of the local
machine compiler, i.e. i686-pc-linux-gnu-gcc, instead of simply gcc.
This way distcc would know which compiler to use.

There are other solutions, like invoking i686-pc-linux-gnu-gcc from
within a script named gcc, etc, but this is ugly. The autotools package
does what I proposed, cmake could do it too.

Regards,
rod



More information about the CMake mailing list