Skip to content

Commit 596d6db

Browse files
authored
doc: stdlib + external BLAS (#165)
1 parent 9ace096 commit 596d6db

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

pages/spec/metapackages.md

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,32 @@ Several pre-built examples can be found in `fpm`'s `example_packages/metapackage
3434

3535
This dependency automatically downloads the latest release of the [fortran-lang standard library](https://stdlib.fortran-lang.org) and adds it to the project as a git dependency.
3636

37-
```{code-block} toml
38-
:emphasize-lines: 2
37+
```toml
3938
name = "with_stdlib"
4039
dependencies.stdlib = "*"
4140
```
4241

42+
Starting with **fpm version 0.12.0**, if both the `stdlib` and `blas` metapackages are enabled, the standard library will be configured to link against the external BLAS/LAPACK implementation provided by the `blas` metapackage.
43+
44+
When this configuration is active, the following preprocessor macros are automatically defined:
45+
46+
* `STDLIB_EXTERNAL_BLAS`
47+
* `STDLIB_EXTERNAL_LAPACK`
48+
49+
These macros disable internal fallback routines in `stdlib` and enable use of the external BLAS/LAPACK library.
50+
51+
To enable this setup:
52+
53+
```toml
54+
[dependencies]
55+
stdlib = "*"
56+
blas = "*"
57+
```
58+
59+
An example is provided in:
60+
61+
[`example_packages/metapackage_stdlib_ext_blas`](https://github.com/fortran-lang/fpm/tree/main/example_packages/metapackage_stdlib_ext_blas)
62+
4363
## fortran-lang MINPACK
4464

4565
This dependency automatically downloads the release v2.0.0-rc1 of the modernized [fortran-lang MINPACK](https://github.com/fortran-lang/minpack) and adds it to the project as a git dependency.

0 commit comments

Comments
 (0)