[CMake] Cross Compiling

Alexander Neundorf a.neundorf-work at gmx.net
Mon Jan 4 13:07:12 EST 2010


On Monday 04 January 2010, Daniel Stonier wrote:
> 2010/1/4 David Cole <david.cole at kitware.com>
>
> > Are you following the directions here?
> > http://www.cmake.org/Wiki/CMake_Cross_Compiling
> >
> > Or trying to cross compile some other way...?
> >
> >
> > Yes, that's where I got started - been using that for quite a while. Just
>
> noticed some loose ends recently. Note - if I follow that for something
> like the eldk example (used to do exactly that for a powerpc board),
> CROSS_COMPILING never gets set because both host and target system names
> are Linux. 

the main point is not whether they are different, the main point is whether 
cmake detects the OS itself (then it detects what is running on the build 
host, and it is not cross compilint), or whether this is already preset (to 
keep cmake from detecting the OS itself, which mean that it is a cross 
compile, since this is the only condition where it doesn't make sense to have 
cmake detect it automatically).

So even if the OS is the same for host and target, you still need to preset 
the CMAKE_SYSTEM_NAME variable.

Alex


More information about the CMake mailing list