September 2018
Intermediate to advanced
606 pages
14h 32m
English
As shown in Chapter 7, Structuring Projects, we will structure our project as a tree. Each subdirectory has a CMakeLists.txt file with instructions pertaining to that directory. This allows us to confine as much information as possible within the leaf directories as in this example:
.├── CMakeLists.txt└── src ├── bt-randomgen-example.f90 ├── CMakeLists.txt ├── interfaces │ ├── CMakeLists.txt │ ├── interface_backtrace.f90 │ ├── interface_randomgen.f90 │ └── randomgen.c └── utils ├── CMakeLists.txt └── util_strings.f90
In our case, we have a src subdirectory containing the sources, including bt-randomgen-example.f90, our executable. Two further subdirectories, interfaces and utils, contain more source code that will be compiled ...
Read now
Unlock full access