[CMake] Visual Studio generator and cross-compilation

Josef Karthauser joe.karthauser at geomerics.com
Mon Feb 4 10:40:06 EST 2008


> -----Original Message-----
> From: cmake-bounces+joe.karthauser=geomerics.com at cmake.org
> [mailto:cmake-bounces+joe.karthauser=geomerics.com at cmake.org] On
Behalf
> Of Emmanuel Blot
> Sent: 03 February 2008 20:15
> To: cmake at cmake.org
> Subject: [CMake] Visual Studio generator and cross-compilation
> 
> Hi all,
> 
> Does cmake (2.5 pre) support generation of build files for Visual
> Studio (2008 if that matters) projects for cross-compiling to a
> different OS/CPU (needs: eCos/ARM).
> 
> It seems that when such a generator is selected, CMake simply ignores
> the "force compiler" directives and select CL as the compiler, whereas
> the CMake file project does specify an alternate compiler (arm-elf-gcc
> in my example).
> 
> Is there any method to tell CMake to generate the IDE files for use
> with Visual Studio, but to create regular makefiles such as with the
> "Unix Makefiles" target, so that Visual Studio can launch a cross-
> compilation session ?

It's not too easy to get it to work under 2.4.x.  We've had to quite a
fair bit of glue and plasters to make it work, however I'm told that 2.6
has a much improved cross compile infrastructure.  I'm looking forward
to finding that it works well :). (or submitting loads of bugs if it
doesn't :b  ).

Joe


More information about the CMake mailing list