[CMake] Problem with Fortran module enclosed in #ifdef

Arjen Markus arjen.markus at wldelft.nl
Fri Jan 9 04:37:47 EST 2009


>>
> You are right, that this is uncommon. But I'm trying to replace an
> existing "build system" for some thousands of files, which preprocesses
> all Fortran files, even those with ".f" suffix. Unfortunately this is
> something I can't change.
> I could use the approach you suggest, but I'd like a more general
> solution, because I cannot be sure, that this is the only file, where
> preprocessing makes a difference. There might
> be other files containing a USE directive enclosed in ifdefs.
>

Most compilers seem to have a switch to turn preprocessing on,
no matter what the extension is. While that is not very portable
(but then, .F is not either!), it will get you going.

Regards,

Arjen


More information about the CMake mailing list