Skip to content

Commit dffb4fc

Browse files
authored
Clarify linking order and correct LAPACK example (#155)
1 parent 6cbfd2a commit dffb4fc

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

pages/spec/manifest.md

+9-7
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ main = "tester.F90"
352352

353353
[[test]]
354354
name = "tester"
355-
link = ["blas", "lapack"]
355+
link = ["lapack", "blas"]
356356
[test.dependencies]
357357
helloff = { git = "https://gitlab.com/everythingfunctional/helloff.git" }
358358
```
@@ -378,12 +378,14 @@ To link against the zlib compression library use
378378
link = "z"
379379
```
380380

381-
To dependent on LAPACK also BLAS should be linked.
382-
In this case the order of the libraries matters:
381+
When linking multiple libraries with dependencies, the order matters.
382+
A library must appear before the libraries it depends on.
383+
384+
For example, since LAPACK depends on BLAS, BLAS must come later in the list:
383385

384386
```toml
385387
[build]
386-
link = ["blas", "lapack"]
388+
link = ["lapack", "blas"]
387389
```
388390

389391
## Use system-installed modules
@@ -559,8 +561,8 @@ The local dependency path is given relative to the ``fpm.toml`` it is written to
559561

560562
### Dependency-specific macro setting
561563

562-
As of ``fpm>=0.9.1``, an array of dependency-specific macros can be passed to a single dependency from the manifest, in the same fashion as in the manifest's [preprocessor configuration](#preprocessor-configuration) table. Its `preprocess` table needs to be entered as part of the dependency entry. fpm will not check if the passed macros collide with the dependencie's own manifest, so, it is the user's responsibility to ensure that no collisions or unexpected behavior occur.
563-
For example, one can control the `REAL` precision that one library is to be used with:
564+
As of ``fpm>=0.9.1``, an array of dependency-specific macros can be passed to a single dependency from the manifest, in the same fashion as in the manifest's [preprocessor configuration](#preprocessor-configuration) table. Its `preprocess` table needs to be entered as part of the dependency entry. fpm will not check if the passed macros collide with the dependencie's own manifest, so, it is the user's responsibility to ensure that no collisions or unexpected behavior occur.
565+
For example, one can control the `REAL` precision that one library is to be used with:
564566

565567
```toml
566568
[dependencies]
@@ -586,7 +588,7 @@ library = true
586588

587589
## Preprocessor configuration
588590

589-
Under the *preprocess* section, you can specify one or more preprocessor to use in an fpm project.
591+
Under the *preprocess* section, you can specify one or more preprocessor to use in an fpm project.
590592

591593
### Specifying the preprocessor
592594

0 commit comments

Comments
 (0)