[CMake] Cross-compilation on Linux targeting Windows

Daniel Stonier d.stonier at gmail.com
Thu Apr 12 08:27:12 EDT 2012


On 12 April 2012 21:12, Clifford Yapp <cliffyapp at gmail.com> wrote:

> Having done a little investigation into cross-compilation (after
> blowing away my Windows partition more or less unintentionally) it
> looks like our build is Not a Good Candidate - we do a truckload of
> introspection, as well as using custom commands and targets based off
> of binaries we build during compilation.
>
> While this problem (executables generated for a different platform
> during build testing) is of course not solvable in the general case,
> on Linux there is actually a glimmer of hope that binaries built for
> Windows *could* be run as part of the build process - i.e. using Wine
> when running each binary that is an output of the current build
> process.
>
> Has anyone ever looked into this?  Would it be possible to have
> TRY_RUN, execute_process and add_custom_command (plus any others I
> missed) use wine "under the hood" to execute WIN32 compiled build
> targets?
>
>
That actually caused me about 2-3 hours of bewilderment when I first
switched from gentoo to an ubuntu machine with wine installed. All my
windows cross compiles went awol and it took that long to work out that the
build system was actually successfully executing some tests.

I never took advantage of it though - so I can't tell you if there are many
traps lurking under the hood due to niggling inconsistencies. It should be
quite feasible though.

Daniel.

Cheers,
> CY
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Phone : +82-10-5400-3296 (010-5400-3296)
Home: http://snorriheim.dnsdojo.com/
Yujin Robot: http://www.yujinrobot.com/
Embedded Ros : http://www.ros.org/wiki/eros
Embedded Control Libraries: http://snorriheim.dnsdojo.com/redmine/wiki/ecl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120412/e0a96bc3/attachment.htm>


More information about the CMake mailing list