[CMake] fortran flags in a c++ linked executable
Alin M Elena
alinm.elena at googlemail.com
Tue Mar 31 15:30:42 EDT 2009
man g++
add_definition is a preprocessor directive not linking flag
Alin
--
______________________________________________________________________
"If the Universities will not study useless subjects, who will?"
G. F. FitzGerald, Nature, 45/46, 392 (1892)
______________________________________________________________________
Mr Alin M ELENA
Irish Centre for High-End Computing -- www.ichec.ie
The Design Tower, Trinity Technology & Enterprise Campus
Grand Canal Quay, Dublin 2, Ireland
Tel: +353 (0) 1 5241608 ext 29
Fax: +353 (0) 1 7645845
http://alin.elenaworld.net
alin.elena at ichec.ie
alinm.elena at gmail.com
______________________________________________________________________
On Tuesday 31 March 2009 17:27:39 you wrote:
> > 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/27c7e878/attachment-0001.htm>
More information about the CMake
mailing list