diff options
author | init current directory[i] <urbanjost@comcast.net> | 2020-11-27 08:21:38 -0500 |
---|---|---|
committer | init current directory[i] <urbanjost@comcast.net> | 2020-11-27 08:21:38 -0500 |
commit | 6de6ed2c8e1056dee33ee562dd69f3a965ffe215 (patch) | |
tree | b4e986081cbd6fa0fd3d7864958257555f0f37f9 /test/help_test | |
parent | 105644ca8bce711b407e1a15f8f456693f60ff43 (diff) | |
download | fpm-6de6ed2c8e1056dee33ee562dd69f3a965ffe215.tar.gz fpm-6de6ed2c8e1056dee33ee562dd69f3a965ffe215.zip |
The `run`, `test`, and `build` Fortran fpm(1) command has a new switch
added called *--fc* that sets the Fortran compiler name.
+ The default compiler name to use is taken from the value of the
environment variable FPM_FC.
+ If not set, the environment variable FC is used.
+ If it is not set the name _gfortran_ is used.
+ The value specified on the command line overrides any default.
FC is apparently a commonly used environment variable for the compiler,
is short, and allows for specifying compilers for other languages like
C (ie. `-cc gcc`) That is part of the reasons to use `--fc` instead of
`--compiler`.
Since there is a chance the currently set value of FC may be used by
other applications being used, and to allow for a temporary change of
the default the fpm-specific variable FPM_FC is supported in addition
to FC and has higher precedence.
However, since the Haskell version has a similar switch called
**--compiler** that name is an alias for **-fc**.
A skeleton was started for standard debug and release builds that allows
for compilers other than **gfortran**. I now have access to **ifort**
and **nvfortran** and it works with at least simple cases for those
compilers. Looking for someone with access to other compilers to help
flesh that out.
The list of executables to run with the `run` and `test` subcommands
can now be prefixed with **--target**, as with the Haskell version of
ffpm(1).
So default usage is unchanged from the previous version. By simply setting
FC or FPM_FC you can use it like the previous version with other compilers for
default debug and release builds.
How does that sound?
wget http://www.urbanjost.altervista.org/REMOVE/ffpm.f90
gfortran ffpm.f90 -o $HOME/.local/bin/ffpm
```
# get a test package or use your own
if [ ! -d M_CLI2 ]
then
git clone https://github.com/urbanjost/M_CLI2
fi
cd M_CLI2
# default build using ifort
ffpm build --fc ifort
export FPM_FC=ifort
ffpm run
ffpm test
Diffstat (limited to 'test/help_test')
0 files changed, 0 insertions, 0 deletions