In case somebody is interested, I’ve created a cookiecutter-template for creating fully featured Fortran projects with CMake build from scratch. Projects created with the template will automatically contain
- a complete CMake setup for building, testing and installing the project,
- separate CMake config file with user customizable options,
- separate directories for the library source and the application which uses the library (similar to the directory structure the Fortran Package manager creates),
- unit tests which can be automatically executed,
- an integration test, which can check, whether the installed library and its CMake package file can be found and used by other CMake-based projects and
- GitHub workflow instructions to execute all tests (unit tests, integration test) on Linux and Mac OS whenever you push a new commit to GitHub.
A version with Fypp-based preprocessing would follow later.
Of course, as the generated project is CMake based, it can not offer the simplicity of fpm based projects. Nevertheless, for those wishing to create CMake based Fortran projects, it could provide a good start.