csdms / bmi-fortran

Basic Model Interface for Fortran
https://bmi.readthedocs.io
MIT License
6 stars 10 forks source link

Use BMI version in module name #36

Closed mdpiper closed 5 years ago

mdpiper commented 5 years ago

This PR introduces an interesting change to the Fortran BMI specification. To prevent collisions between BMI versions, I've appended the Fortran BMI version to the name of the module. So, what was

module bmif

is now

module bmif_1_2

where 1.2 is the BMI version. When compiled, this will produce the module file bmif_1_2.mod. Here's the updated tree of the install:

./
├── include
│   └── bmif_1_2.mod
└── lib
    ├── libbmif.so -> libbmif.so.1.2
    └── libbmif.so.1.2

Advantages of this approach:

Disadvantages of this approach:

Note that I also revised the cmake build process, since I keep learning more about cmake.

cc @wk1984 & @rmcd-mscb for opinions. h/t @mgalloy for this idea.