[CMake] CMake and distcc

Eric Noulard eric.noulard at gmail.com
Wed Jan 16 16:21:40 EST 2008


2008/1/16, Rodolfo Lima <rodolfo at rodsoft.org>:
> 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.

Could you explain a little more

0) Which version of CMake do you use?

1) How did you invoke CMake with distcc?

    Is it something like:
    CC="distcc gcc" CXX="distcc g++" cmake
    or something different?

2) What you are trying to do?
    Shouldn't all boxes used by distcc share their architecture?
    I mean can you use distcc with 2 boxes one being i686 and
    the other one being amd64?
    How should this work?


> 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

Do you mean you CANNOT use "gcc" but a gcc cross compiler
named like "i686-pc-linux-gnu-gcc", if yes then may be you can try
invoking CMake like this:

CC="distcc i686-pc-linux-gnu-gcc" cmake

>
> 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.

I'm not a distcc user so I may miss some point about its usage,
sorry about that.
-- 
Erk


More information about the CMake mailing list