BOUT-dev
BOUT-dev copied to clipboard
Add `--version` command line argument
#2595 made me realise we still don't have a --version
command line argument. Ideally, this should report both the model version and the library version, something like:
$ ./my_model --version
my_model 1.2.3 (BOUT++ library v5.0.0)
Reporting the library version is trivial, but we'd need some mechanism for getting the library version. We could probably use the same infrastructure to add information to --help
.
Maybe some optional struct like:
struct MyModelMetadata {
std::string version = VERSION;
std::string description = "My BOUT++ model, solves the physics equations and that";
// Could be used to print help on model options
std::string options_key = "my_model";
};
This would be passed to BOUTMAIN
(or even better, some BoutSimulation
class as a template argument).