[Scons-users] F90PPCOM vs F90COM not invoked correctly

Luke Robison lukerobison at gmail.com
Fri May 1 12:54:39 EDT 2020


Reviving this old thread one more time:

I decided I wanted to force a .f file to be pre-processed as if it were a
.F file.  This is as simple as adding "-cpp" to the arguments, but that
flag is compiler-specific, so I thought I'd go the SCons way and change the
FORTRANCOM to FORTRANPPCOM for better support across compilers.

It turns out the FORTRANPPCOM command doesn't include the -cpp argument to
force pre-processing (at least not for gfortran).  It relies on the
compiler sensing the case of the extension to turn on that flag.  Should
this be made explicit in the PPCOM commands (by changing the builders in
future scons releases)?  Or is this just a place where I should include a
switch based on the value of FC to decide how to add the appropriate flag?

Luke

On Fri, Apr 24, 2020 at 12:57 PM Luke Robison <lukerobison at gmail.com> wrote:

> Good idea.  I don't really want to change all code to be compiled with
> F90PP, but I could make another env.Clone() just for my .F90 files...
>
> On Fri, Apr 24, 2020 at 11:57 AM Damien <damien at khubla.com> wrote:
>
>> You can hack it this way in the SConscript file:
>>
>> env['F90COM'] = env['F90PPCOM']
>>
>> Damien
>>
>> On 4/24/2020 10:35 AM, Luke Robison wrote:
>>
>> Bill,
>>
>> Do you have any tips on how would I go about asking scons to compile a
>> given .F90 file using the F90PPCOM command rather than the F90COM?
>>
>> Luke
>>
>> On Thu, Apr 16, 2020 at 2:23 PM Luke Robison <lukerobison at gmail.com>
>> wrote:
>>
>>> No, it would not allow those in the same directory.
>>>
>>> On Thu, Apr 16, 2020 at 1:52 PM Bill Deegan <bill at baddogconsulting.com>
>>> wrote:
>>>
>>>> Does msys allow a.F90 and a.f90 in same dir?
>>>>
>>>>
>>>> On Thu, Apr 16, 2020 at 9:57 AM Mats Wichmann <mats at wichmann.us> wrote:
>>>>
>>>>> On 4/16/20 10:35 AM, Luke Robison wrote:
>>>>>
>>>>> > Mats,
>>>>> >
>>>>> > Interesting to note that the list is missing .F90 .F95 .F03 .F08.  I
>>>>> > think the scanner would only affect the dependency generation,
>>>>> right?
>>>>> > The Fortran Tool already defines it's own scanners, I'm not sure why
>>>>> any
>>>>> > fortran file extensions would be in that CScanner list.
>>>>>
>>>>> I figured it was because they're expected to be c-preprocessed, which
>>>>> is
>>>>> what you were talking about - that's what is documented in
>>>>> "SYSTEM-SPECIFIC BEHAVIOR" in the manpage.  Maybe the others you
>>>>> mention
>>>>> above are missing because they were not intended to have this effect -
>>>>> they're not documented as such - or maybe someone just forgot?
>>>>>
>>>>> elsewise, this part of the codebase is opqaue to me, I haven't looked
>>>>> at
>>>>> it directly.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Scons-users mailing list
>>>>> Scons-users at scons.org
>>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>>
>>>> _______________________________________________
>>>> Scons-users mailing list
>>>> Scons-users at scons.org
>>>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>>>
>>>
>> _______________________________________________
>> Scons-users mailing listScons-users at scons.orghttps://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>>
>> _______________________________________________
>> Scons-users mailing list
>> Scons-users at scons.org
>> https://pairlist4.pair.net/mailman/listinfo/scons-users
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20200501/6e357e39/attachment-0001.html>


More information about the Scons-users mailing list