[CMake] Thoughts on Cross-compiling with CMake
Trevor Kellaway
tkellaway at asl-electronics.co.uk
Sun Apr 29 13:04:31 EDT 2007
[Repost as list won't accept large patch, only
cross-compiler-base-diff-against-2.4p6.diff included]
> -----Original Message-----
> From: Trevor Kellaway
> Sent: 29 April 2007 18:00
> To: cmake at cmake.org
> Cc: 'bernhard.sputh at gmail.com'
> Subject: RE: [CMake] Thoughts on Cross-compiling with CMake
>
> Bernhard,
>
> > That would be ID 14, opened in 2003 and set on low
> priority, well very
> > low it seems to me.
>
> Well I wouldn't hold you breath...
>
>
> > > Have a look at this thread
> > > http://public.kitware.com/pipermail/cmake/2007-March/013083.html
> >
> > This thread must have slipped my radar, it looks very
> similar to what
> > I was thinking of. Except that my idea was to modify the
> behaviour of
> > the CMake's source code, while Your solution relies on simply
> > modifying the scripts CMake uses.
>
> I was trying not to modify CMake source, given it nicely uses
> scripts that are easy to change, and more accessible to most people.
>
>
> > > I'm using this approach to build multiple targets, for embedded
> > > processors with multiple compilers (and for the PC as well).
> > >
> > > I can post the patches if you like.
> >
> > Thank You, that would be helpful, even if I learnt a lot from the
> > snippets You sent in Your earlier post.
>
> Patches attached, against 2.4p6 release, but patches created
> against my Subversion base copy of CMake (sorry):
>
> cross-compiler-base-diff-against-2.4p6.diff - This file
> contains just the mods to the existing CMake files.
> cross-compiler-additions-against-2.4p6.diff - This file
> contains my additional files, this is a work in progress.
>
> To perform an out of source build for Metrowerks HC12X where
> the compiler is chc12.exe:
>
> mkdir build
> cd build
> cmake -G"NMake Makefiles"
> -DCMAKE_CROSS_COMPILER:string=chc12 ..\source
>
> Note that GenericBuildPrologue.cmake does some nasty
> non-standard things to CMAKE_BUILD_TYPE (via
> GENERIC_BUILD_TYPE), setting the style of build based on the
> output directory name, this is because our existing build
> system which I'm porting does this. This is *not* the correct
> CMake way of doing things.
>
> > BTW, have You submitted the patches to the development team?
>
> Nope, mainly because I don't know how to. This project seems
> unlike others that actively publish bleeding edge builds, all
> I've found is the main CVS tree (I use Subversion) and this
> forum, I assume the developers hang out here?
>
> CMake is very good once you start to get the hang of it, but
> it can be an uphill struggle with the lack of documentation
> at times, which could well put people off.
>
> - TrevK
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cross-compiler-base-diff-against-2.4p6.diff
Type: application/octet-stream
Size: 2910 bytes
Desc: cross-compiler-base-diff-against-2.4p6.diff
Url : http://public.kitware.com/pipermail/cmake/attachments/20070429/2227b141/cross-compiler-base-diff-against-2.4p6.obj
More information about the CMake
mailing list