[Scons-users] SCons ignoring FORTRANPATH

Paul T. Bauman ptbauman at gmail.com
Wed Sep 24 07:55:50 EDT 2014


On Wed, Sep 24, 2014 at 3:00 AM, Tom Cook <tom.k.cook at gmail.com> wrote:

> Hi,
>
> I have a SCons build which includes a number of Fortran modules.  For
> at least some of these modules, the FORTRANPATH variable seems to be
> ignored.  The output of env.Dump() is shown at the end of this email,
> showing a number of directories listed in FORTRANPATH; however, when
> trying to build a Fortran source file, this command-line is used:
>
> gfortran -o "Build/Linux/Product/Calculation/ProductSim
> F/DTBWindInit.o" -c -cpp -ffixed-line-length-none
> -ffree-line-length-none -fcoarray=single
> "-JBuild/Linux/Product/Calculation/ProductSim F"
> "Source/Product/Calculation/ProductSim F/DTBInit.f90"
>

Fortran builds can be a little finicky - you have to set it up just right
for it to get the automatic dependencies right. Check out this thread:
http://scons.tigris.org/ds/viewMessage.do?dsForumId=1272&dsMessageId=2458713


In particular, for whatever reason, FORTRANPATH only picks up .f and .F
files. For .f90 and .F90, you need to set F90PATH. Furthermore, you need to
be sure to set them when the Environment is first created.

HTH,

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20140924/a5b91187/attachment.html>


More information about the Scons-users mailing list