Hi all, another one on mixed Fortan/C{++} executables here.
Suppose you have one C{++} source file, a Fortran one, and a C{++} main. They all need to be compiled and linked into an executable. There are different situations where CMake doesn't do what I expected: (* All GCC, the linker is gfortran. All is fine.) * All GCC, the linker is g++. CMake doesn't seem to account to for linking against libgfortran.a. * All Intel. When compiling with icc, the Fortran standard library needs to be manually added just like with GCC. * All Intel. When compiling with ifort, the mandatory options "-nofor-main -lstdc++ " need to be manually specified. Otherwise, one has two MAIN_ routines. For GCC, the "solution" now is to force Fortran a linker language. Well, I suppose there's some switch I forgot to set, and maybe one of you can help me out. Of all those situations, I'm most interested in solutions to the last one. Cheers, Nico _______________________________________________ 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