Adding support for Fortran Package Manager
samharrison7 opened this issue · comments
There's a relatively new package manager on the block for Fortran, aptly called the Fortran Package Manager, or fpm
for short. It aims to make building Fortran projects with dependencies easier than the standard methods commonly used (like manually installing or simply copying over source files).
I think it would be very neat if the BMI Fortran module could be installed using fpm
. In short, this would mean that a Fortran programmer using fpm
to build their code and who wanted to implement the BMI could simply add a one-liner to their fpm.toml
file (the fpm
config file that controls the build of each package):
[dependencies]
bmi = { git = "https://github.com/csdms/bmi-fortran" }
If you guys are interested in this, I would be more than happy to rustle up a PR to show how it could work in action. In theory it should just be a case of adding an fpm.toml
file to the repo with some build instructions.
👍 I think this would be super cool.
As promised, here's the PR! #46
I think it would be cool to update bmi-example-fortran to be buildable by fpm too, but this requires a bit more thinking about. Fpm is a little opinionated when it comes to naming conventions (it likes test
instead of tests
, example
instead of examples
...) and it's difficult to control where it runs its tests from - I gave it a go and was getting failures because it couldn't find the sample.cfg file. I'll give this another go next week!
Resolved with #46.