[CMake] fortran flags in a c++ linked executable
James C. Sutherland
James.Sutherland at utah.edu
Tue Mar 31 12:27:39 EDT 2009
>
> Should not the flag be passed to the linker? So in this case the
> linker flags are read from the c++ compiler flags?
>
I tried adding
add_definitions( ${CMAKE_Fortran_FLAGS} )
But the g++ linker complained about an unrecognized option (the -
fconvert=big-endian option).
When linking, I pull in the gfortran library,
target_link_libraries( readx gfortran )
When creating the fortran object files the appropriate flags are
passed, but the g++ compiler has no notion of endian-ness...
Any other ideas?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090331/c256b823/attachment-0001.htm>
More information about the CMake
mailing list