[CMake] Thoughts on Cross-compiling with CMake
Trevor Kellaway
tkellaway at asl-electronics.co.uk
Sun Apr 29 17:05:57 EDT 2007
Berhard,
> Should not be a major problem, I will read them and then
> maybe modify / extend them to work with the specific setup
> I'm having here.
Concentrate on the following, using the chc12 compiler as an example:
CrossCompiler.cmake
CrossCompiler-chc12.cmake
CrossCompiler-Generic-chc12.cmake
If you create your own CrossCompiler-???.cmake and
CrossCompiler-Generic-???.cmake that is all you should need to do to get
another compiler going, and add this to the CMake creation line
"-DCMAKE_CROSS_COMPILER:string=???" to cause these new files to be
included instead of the native platform compiler.
You can ignore the GenericBuildPrologue.cmake/GenericBuildEpilogue.cmake
related stuff, as this is my ported existing build world support, and is
a bit too specialized, although it may have the odd useful CMake trick
in it, I don't claim to be an expert, far from it, I'm still learning,
but have at least got over the hump now where I can usefully add new
functionality quickly.
I now have my CMake build world supporting the following:
Compilation using embedded compiler.
Compilation using Visual Studio / gcc as we have a PC simulation build.
Running PC-Lint (www.gimpel.com) as part of the build.
Building an Understand C browse database (www.scitools.com)
Creating Doxygen API.
Generating metrics reports (CSV and HTML).
Generating graphical embedded memory map files.
Running continuous and nightly builds, publishing to my Dart2 server.
Running CMake under Eclipse with Subclipse and Subversion /
TortoiseSVN.
The above is now a really nice environment, which my development team
loves.
- TrevK
More information about the CMake
mailing list