[Cmake] Cross compilation support for Unix

Andy Cedilnik andy . cedilnik at kitware . com
05 Aug 2003 14:42:34 -0400


Hi Petr,

Unfortunately not yet.

The issues are with the try_compile etc. 

In order to solve this, we will have to separate host environment and
target environment. Then you will specify the host compiler and target
compiler. This is unfortunately feature for after 1.8.

That said, you can cross compile using CMake. The only thing is that you
have to provide all the answers to all try compiles.

For example, let say you want to compile Hello World on i32 Linux for
Agenda Vr3, which runs Linux on MIPSel. 

You would run cmake on your project, check all the cache values and set
them accordingly. So, compiler will be mipsel-gcc instead of gcc, ...

Lots of work though. There were limited successes on the list. Check
history.

			Andy

On Tue, 2003-08-05 at 13:04, Petr Ferschmann wrote:
> it is possible in CMake to cross compile for another platform?