<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Dear CMake mailing list members and developers,</div>
<div> </div>
<div>I have been looking around for a Linux-to-OSX cross-compiler toolchain suitable for compiling codes typically used in scientific computing for quite some time now. There are a number of toolchains available with gcc and g++, but I also wanted it to have gfortran. Therefore, I started a little work on creating a CMake-based build for such a toolchain.</div>
<div> </div>
<div>Luckily, there are many references which helped me in my endeavour. In the attached CMakeLists.txt you can find an in-depth description of my goals and the references. I also give requirements and build instructions on CentOS6, Ubuntu 12.04 and SLES 11. Maybe, it would help people, if you would make the attached script available via http://www.cmake.org/Wiki/CMake_Cross_Compiling#Information_how_to_set_up_various_cross_compiling_toolchains.</div>
<div> </div>
<div>During the creation of the build script I came, however, across some shortcomings of CMake. Maybe the CMake developers can fix these issues in a future version. The problems were:</div>
<div> </div>
<div>1. It is not possible to calculate MD5 sums of files larger than 4GB with 32-bit CMake from cmake.org. Therefore, I had to use the Linux md5sum tool to check the Xcode .dmg.</div>
<div> </div>
<div>2. The 32-bit CMake from cmake.org cannot handle .tar.xz archives.</div>
<div> </div>
<div>3. Platform/Darwin.cmake assumes that xcode-select is in PATH. While cross-compiling 'the official CMake way' using a toolchain file, this can generate problems. I circumvented these by creating a dummy xcode-select shell script in my toolchain bin directory, which must be in PATH.</div>
<div> </div>
<div>4. Platform/Darwin.cmake assumes that the Applications folder can be found either at /Applications or ${OSX_DEVELOPER_ROOT}/Applications. I had to create the Applications folder beneath the path where my dummy xcode-select script points.</div>
<div> </div>
<div>I hope, my efforts may be useful to somebody else and wish you a nice weekend!</div>
<div> </div>
<div>Simon Triebenbacher</div>
</div></div></body></html>