[Scons-users] comiler flags not applied to all files

Dirk Bächle tshortik at gmx.de
Thu Jul 11 11:42:12 EDT 2013

Hi Nikola,

On 11.07.2013 13:19, Nikola Radovanovic wrote:

> hi all,

> I have a bunch of Fortran files; mainly with *.f90 extension, but also

> few with *.for extension. during compilation, i have noticed that

> F90FLAGS which I've set to build environment are applied only to

> *.f90, but not to *.for files (which causes me problems later at link

> stage).


> [...]


per default, the *.for extension is linked to the standard Fortran
compiler (FORTRANCOM) and uses FORTRANFLAGS, not F90FLAGS.
You can set FORTRANFLAGS to the same value as F90FLAGS and should get
what you want.

Another option would be to link the *.for files to the F90 compiler as
well, if you're sure that you want everything with this extension to get
processed with the F90* setup too. For this, you would redefine the
Fortran file suffix lists as follows:

env = Environment(FORTRANFILESUFFIXES=['.f', '.ftn'],
tools= ...

I hope this helps you further.

Best regards,


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130711/9931df44/attachment.htm

More information about the Scons-users mailing list