-
Notifications
You must be signed in to change notification settings - Fork 116
Description
Following the discussion at the monthly call, I've installed fpm and am trying to convert a few of my Fortran projects to the recommended structure. These projects involve some legacy fixed-style functions and subroutines, an interface module, and several driver programs (tests). The folder structure is something like:
.
├── drivers
│ ├── driver1.f90
| └── driver2.f90
├── src
│ ├── legacy
| | ├── legacy1.f
| | └── legacy2.f
| └── interface.f90
└── fpm.toml
Do I need to add multiple sections such as
[[driver]]
name = "driver1"
source-dir = "drivers"
main = "driver1.f90"
to the TOML file? Right now my build just crashes because of multiple executable files.
I think having multiple executable programs is a quite common type of package, say you have a library for building mesh triangulations, and then with it a small set of command line tools calling routines from this common library.
Another question is can I already specify dependencies on system-wide installed libraries. Say a project (or one of it's dependencies) needs to be linked with -llapack -lblas (with the actual LAPACK and BLAS libraries potentially in some non-default location). Does this fit under issue #99 of custom build scripts?
I had a few other comments about the installation process, but they were already fixed in #101. A remaining point might be that after doing stack install in the fpm folder, the ${HOME}/.local/bin/ folder might not be on the path already, requiring an extra command export PATH="$PATH:$HOME/.local/bin/".