Getting ready

The file tree structure is very similar to the previous two recipes. We have replaced C++ with Fortran sources and in this case, we have no header files:

.├── CMakeLists.txt├── external│   ├── CMakeLists.txt│   ├── conversion.f90│   └── README.md├── src│   ├── CMakeLists.txt│   ├── evolution│   │   ├── ancestors.f90│   │   ├── CMakeLists.txt│   │   ├── empty.f90│   │   └── evolution.f90│   ├── initial│   │   ├── CMakeLists.txt│   │   └── initial.f90│   ├── io│   │   ├── CMakeLists.txt│   │   └── io.f90│   ├── main.f90│   └── parser│       ├── CMakeLists.txt│       └── parser.f90└── tests    ├── CMakeLists.txt    └── test.f90

The main program is in src/main.f90:

program example  use parser, only: get_arg_as_int  use conversion, only: binary_representation use initial, only: initial_distribution ...

Get CMake Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.