[CMake] Problem with Fortran module enclosed in #ifdef

Martin Apel martin.apel at simpack.de
Fri Jan 9 03:27:59 EST 2009


Hi all,

I am experiencing a problem with one Fortran source file containing a
module definition. Unfortunately the whole source file is enclosed in
'#ifdef WINDOWS'. On Linux this causes the build process to fail,
because cmake wants to copy a generated .mod file, which does not exist.
The file containing the module has the suffix ".f". When changing the
suffix to ".F", everything works fine.
CMake probably thinks, the file need not be preprocessed before
scanning, if it has the suffix ".f". Is there any way to tell CMake,
that files with the suffix ".f" have to be preprocessed before
dependency scanning?

Regards,

Martin

____________
Virus checked by G DATA AntiVirus
Version: AVF 19.215 from 08.01.2009




More information about the CMake mailing list