[Scons-users] F90PPCOM vs F90COM not invoked correctly

Luke Robison lukerobison at gmail.com
Wed Apr 15 18:23:49 EDT 2020


I am running scons-3.1.2 under MSYS, and realizing it does not recognize
.F90 files as requiring the F90PPCOM command.  Instead scons is running the
F90COM command, which doesn't include the CPPDEFINES.

On the other hand, gfortran is recognizing the .F90 vs .f90 extension and
performing preprocessing as requested, it just doesn't have the correct
$CPPFLAGS to work.

Using scons 3.0.1 under WSL, the correct F90PPCOM is executed.  Is this a
bug in the newer version of scons?  Additionally I think my scons-3.1.2 is
run under python3, while my scons-3.0.1 is run under python-2.7 (but I'm
not sure about that).

----

env_clean = Environment()
env_clean.Append(CPPDEFINES={'DEFINEDVAL':'1'})
env_clean.Alias('test',env_clean.Program('test1.f90'))
env_clean.Alias('testpp',env_clean.Program('test2.F90'))

----

$ scons --debug=presub testpp
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
Building test2.o with action:
  *$F90COM*
gfortran -o test2.o -c test2.F90
test2.F90:3:2:

    3 | #warning "this has been PreProcessed"
      |  1~~~~~~
Warning: #warning "this has been PreProcessed" [-Wcpp]
test2.F90:6:20:

    6 |     bar = DEFINEDVAL
      |                    1
Error: Symbol 'definedval' at (1) has no IMPLICIT type
scons: *** [test2.o] Error 1
scons: building terminated because of errors.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200415/d483d8f9/attachment.html>


More information about the Scons-users mailing list