[CMake] cmake + OSX + gfortran + 64bit problem

Convey, Christian J CIV NUWC NWPT, B-171 christian.convey at navy.mil
Wed Dec 15 17:08:10 EST 2010


Here's what I've got:
Cmake: 2.8.3
OS X: 10.5.x
gfortran: 4.5.1

I'm trying to build a Fortran program on OS X using CMake.  I'm trying to write CMakeLists.txt files that can handle either the GNU fortran compiler or the Intel fortran compiler.

When set CMAKE_OSX_ARCHITECTURES to x86_64, the resulting makefiles end up supplying "-arch x86_64" to the gfortran command line.  That flag is appropriate for the Intel fortran compiler but it isn't valid for gfortran, even on a Mac.  It should be "-m64".

Does anyone know of a good way around this?


Christian Convey
Scientist, NUWC Division Newport
1176 Howell St., Newport, RI 02842
email: christian.convey at navy.mil
phone: (401) 832-6824
fax: (401) 832-4749


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5218 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101215/90206bf9/attachment.bin>


More information about the CMake mailing list