03-3. FPM Settings
Here we configure the compiler and FPM settings in the file fpm.toml
.
Explanation of File Contents
name = "PDE_Solver"
version = "0.1.0"
license = "license"
author = "Elliot James"
maintainer = "ejb321@ic.ac.uk"
copyright = "Copyright 2024, Elliot James"
Here we configure general build settings in the fpm.toml file. Of particular importance to us is linking blas and lapack to FPM using the link variable.
[build]
auto-executables = true
auto-tests = true
auto-examples = true
module-naming = false
# adds lapack and blas packages
link = ["blas", "lapack"]
The following instructs FPM not to install the package as a library.
[install]
library = false
The following are standard Fortran settings.
[fortran]
implicit-typing = false
implicit-external = true
source-form = "free"
The following settings allows FPM to utilize openmp. Although we haven't explicitly parallelized anything in our code, external packages can often use openmp to enhance runtime execution speed.
[dependencies]
openmp="*"
The options below sets the name of the executable to be created by FPM.
[[executable]]
name = "PDE_Solver"
The options below allows us to use the test-drive
framework to set up and execute testing routines.
[dev-dependencies]
test-drive.git = "https://github.com/fortran-lang/test-drive"
test-drive.tag = "v0.4.0"
The options below link the directory src
to FPM. This enables FPM to read the .f90
files in src
. The build-script
variable allows the specification of complier settings.
[library]
source-dir="src"
#build-script=" "