CMake template for using stdlib

I created an example how to integrate the Fortran standard library (stdlib) in CMake projects at

This example should jump start you from zero to production with minimal effort, you can even use it directly as template to create a new repository on GitHub including a full CI setup.

The aim was to have a robust and readable CMake style, which generally stays out of the way and allows customization with minimal exposure to CMake (as much as this is possible with CMake).

Let me know what you think, feedback to improve stdlib’s usability and/or the CMake example is very welcome.


Thanks for doing that. Down the road I hope to port stdlib to fpm, and write cmake backend for fpm, so that fpm itself could generate such a cmake template.


Being free of ever having to write CMake again sounds very appealing to me.