Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Alin M Elena
Hi Martin, the compiler decides which files get preprocessed and which files not. here is some info from ifort o Filenames with the suffix .f, .for, or .ftn are interpreted as fixed-form Fortran source files. o Filenames with the suffix .fpp, .F, .F

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
Michael Wild wrote: > On 9. Jan, 2009, at 10:26, Martin Apel wrote: > > >> Michael Wild wrote: >> >>> On 9. Jan, 2009, at 9:27, Martin Apel wrote: >>> >>> >>> Hi all, I am experiencing a problem with one Fortran source file containing a module definition. Unf

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Michael Wild
On 9. Jan, 2009, at 10:26, Martin Apel wrote: Michael Wild wrote: On 9. Jan, 2009, at 9:27, Martin Apel wrote: 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

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Arjen Markus
> Yes, I know. But my problem is not with the compiler itself, but with > CMake. It seems to assume, that during scanning of dependency and module > information, > files with a suffix of ".f" don't have to be preprocessed, whereas files > with ".F" are preprocessed. I am searching for a way to tell

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
Arjen Markus wrote: >> 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

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Arjen Markus
>> > 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

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
Michael Wild wrote: > On 9. Jan, 2009, at 9:27, Martin Apel wrote: > > >> 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 fa

Re: [CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Michael Wild
On 9. Jan, 2009, at 9:27, Martin Apel wrote: 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 gener

[CMake] Problem with Fortran module enclosed in #ifdef

2009-01-09 Thread Martin Apel
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 co