[Scons-users] Does SCons work correctly for fortran submodules?
Bill Deegan
bill at baddogconsulting.com
Fri Apr 27 15:46:35 EDT 2018
Peter,
Any reason you're using the development version of SCons instead of the
released version 3.0.1?
What does scons --tree=prune show you?
-Bill
On Fri, Apr 27, 2018 at 12:04 PM, Peter Diener <diener at cct.lsu.edu> wrote:
> Hi,
>
> Is SCons supposed to work for fortran codes that use submodules and type
> bound procedures? I have a code project that relies heavily on
> those features and I would really like to use SCons for it. I was able
> to produce a small example code that demonstrates the problem I encounter
> (it only appears with more than one submodule) that I have
> attached along with the SConstruct file I use.
>
> The code example consists of two modules, each containing a fortran type
> with 2 type bound procedures ( a set and get for an integer value). In the
> module itself the type and the interface to the procedures are defined
> while the actual implementation of the procedures are done in the
> submodules. Normally I would keep the module and corresponding submodule in
> different files to separate the interface and implementations.
>
> When I run scons on this example, I get:
>
> scons: Reading SConscript files ...
>
> scons: *** Multiple ways to build the same target were specified for:
> function.mod (from ['test_1.f90'] and from ['test_2.f90'])
>
> Is my SConstruct file incorrect, should I not expect SCons to be able to
> handle such a case or is this a bug?
>
> My SCons is an up to date checkout of the GitHub repository, i.e.
>
> scons --version
>
> gives:
>
> SCons by Steven Knight et al.:
> script: v3.1.0.alpha.yyyymmdd.867f762f
> 6c1e23524cd1b0262b8e93e822b23d0c
>
> Note, the example code compiles correctly with a sufficiently new version
> of gfortran and the command line:
>
> gfortran test_1.f90 test_2.f90 test_submodules.f90 -o test_submodules.x
>
> Thank you in advance for any advice.
>
> Cheers,
>
> Peter Diener
>
> _______________________________________________
> 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/20180427/eb70c8bb/attachment.html>
More information about the Scons-users
mailing list