Higher-level functions

We currently process each module configuration independently - one at a time. This means that the links between modules must be manually specified as each module doesn't have any context about the previously generated modules.

In a larger program, multiple calculators will exist requiring scripts to loop over these modules (see MAGICC's example https://gitlab.com/magicc/magicc/-/blob/main/scripts/generate_wrappers.py?ref_type=heads). We should provide a way to process a set of configuration variables. This could include finding all config files in a given module.

Requirements

  • Callable from CMake given a list of module configurations
  • Can resolve/validate module links
  • Generates templated output for each module (using fgen.templator.process_module)

Thoughts

We might have to think about how CMake works. I think it will be like Make where it needs to know each of the files of the generated files by name so that it can cache results. If we generate a bunch of files that it doesn't know about then it may not trigger a compile. Might not matter, but something to be aware of.