[CMake] ccmake and fortran
Arjen Markus
arjen.markus at wldelft.nl
Mon Aug 14 16:51:55 EDT 2006
> At 11:05 AM 8/14/2006, Arjen Markus wrote:
>
Bill,
>
> Right so, as far as comments go, we should have to care if it is free
> format or not. If it is fixed format then the only depends that it will
> have will come from the INCLUDE statement that must be at the start of
> the line. And if we have a mistaken comment it can not hurt.
>
the situation is a bit more complicated:
- Fortran 90/95 still supports the fixed form, so people can
write modules using fixed form. So it is important to recognise
the two forms.
- The earlier solution to recognise comments should _not_ include
d and D - these are used to hide debug statements. The compiler
ignores them unless the right option is explicitly given.
So I think the solution should be:
- A file extension like .f or .for means fixed form, comments
are recognised by the RE ^cC\*.*$ and by !.*$
- A file extension like .f90 means free form, comments are
recognised exclusively by the RE !.*$
Hm, that could go wrong if someone uses file names with a ! in them,
like:
include "my_what_a_name!.f"
though I doubt that will be an important case.
Regards,
Arjen
More information about the CMake
mailing list