O'Reilly logo

CMake Cookbook by Roberto Di Remigio, Radovan Bast

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required