[CMake] gfortran
Alberto Luaces
aluaces at udc.es
Fri Jan 25 11:10:39 EST 2008
El Thursday 24 January 2008 10:16:24 Javier Gonzalez escribió:
> Now, I don't compile any fortran code as part of my project but link to
> a library that was compiled using gfortran. Apparently, to link I then
> need to add the gfortran library which is the one I'm having trouble with.
On a side note: when building a mixed laguage project and fortran is not the
main language, do I have to explicity name the fortran runtime libraries for
every platform as Javier did or does it exist a more elegant way?
This is my toy example so far:
PROJECT( programa Fortran CXX)
LINK_LIBRARIES(-lgfortran)
ADD_EXECUTABLE( programa a.cpp c.f90)
SET_TARGET_PROPERTIES(programa PROPERTIES LINKER_LANGUAGE CXX)
More information about the CMake
mailing list