Skip to content

Advanced Topics

This section covers FoBiS.py's more powerful features for large or complex Fortran projects.

What's here

TopicSummary
Parallel CompilingSpeed up builds with -j on multi-core machines
External LibrariesLink static and shared libraries by path or name
Interdependent ProjectsAuto-rebuild dependencies with -dependon
Volatile LibrariesTrigger rebuilds when linked libraries change
Flag HeritageForce full rebuild when compiler flags change
PreForM PreprocessingIntegrate the PreForM.py template preprocessor
DoctestsEmbed and run micro-tests inside Fortran comments
GNU Makefile ExportExport a GNU Makefile from your fobos settings
Fetch DependenciesClone GitHub-hosted Fortran deps and compile them inline or as libraries
GitHub InstallOne-shot install of a GitHub-hosted FoBiS project

When to use advanced features

Most projects only need the basics covered in Quick Start. Consider the advanced features when you:

  • Have a large codebase and want faster incremental builds — Parallel Compiling
  • Link against pre-built Fortran libraries — External Libraries
  • Maintain a multi-repo project where library A must be rebuilt before program B — Interdependent Projects
  • Use external libraries that change frequently (CI-generated artifacts) — Volatile Libraries
  • Switch between debug/release builds and want reliable full rebuilds — Flag Heritage
  • Use template-based code generation — PreForM Preprocessing
  • Want lightweight atomic unit tests living next to the code — Doctests
  • Need to hand off a GNU Makefile to users without FoBiS.py — GNU Makefile Export
  • Want a declarative way to pull in GitHub-hosted Fortran libraries (inline sources or pre-built library) — Fetch Dependencies
  • Want to install a single GitHub-hosted FoBiS project in one step — GitHub Install