[CMake] Fortran-C mixed code (possible solution)

Arjen Markus arjen.markus at wldelft.nl
Mon Jan 22 05:05:27 EST 2007


Thompson, David C wrote:

>
>
> Correct me if I'm wrong, but I believe there are some
> FORTRAN compilers which change the number of underscores
> appended depending on whether the name already contains
> an underscore (the g77 documentation on -funderscoring, 
> -fno-underscoring, and -fno-second-underscore mentions
> this). So perhaps more effort is required. :-(
>
They indeed exist. A typical example is g77:

my_sub becomes my_sub__
mysub becomes mysub_

but as you need to provide a list of translations manually, this is not 
a programmatic
problem. Besides the scheme would provide the following names:
my_sub, my_sub_ and my_sub__ (plus uppercase variants)
mysub, mysub_ and mysub__ (plus uppercase variants)

The linker would pick out whatever is suitable :)

Regards,

Arjen


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070122/c1c0f4b9/attachment.html


More information about the CMake mailing list