[CMake] Adding cross-compiler support to CMake ...
William A. Hoffman
billlist at nycap.rr.com
Thu Sep 7 17:30:59 EDT 2006
At 04:36 PM 9/7/2006, Brad King wrote:
>Michael Casadevall wrote:
>> I wish to add support for cross-compiling to CMake since its a tool I
>> use a lot, and I can finally kill the last few of my projects using
>> autotools. To my knowledge, autotools is the only system that provides
>> cross-compiling, and poorly at that, and I've been thinking on ways to
>> add it to CMake. Here's what I got so far:
>
>This is one of the oldest feature requests:
>
>http://www.cmake.org/Bug/bug.php?op=show&bugid=14
>
>You may wish to log into the bug tracker, add yourself as a CC for this
>bug, and add comments to it.
>
>We will eventually get to adding cross-compiling support, and it would
>be great to have some discussion available in the bug report for reference.
All said about cross compiling, there are folks doing cross compiling
with CMake. CMake does not really help in any way, but it can be done.
All of the try-run stuff can be stopped by setting the correct cache variables
before cmake is run. So, it should be not that hard to create a cache file
that has all the cmake variables needed for a cross compiler. The tricky part
would be projects that build code generation stuff during the build process.
This would have to be done in a separate build right now, but with correctly
written CMakeLists.txt files you should be able to pre-load the path to those
locally built programs as well. At the end of the day a cross compiler is
just a compiler run from makefiles just like the ones used by cmake for non-cross
compile builds. So, you could say that CMake poorly supports cross compiling today.
-Bill
More information about the CMake
mailing list