Skip to content

Commit 35e7146

Browse files
authored
Merge pull request #906 from moriglia/master
Add `[install]` section to `fpm.toml`
2 parents cc30d4c + f806bec commit 35e7146

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

README.md

+23-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,29 @@ python config/fypp_deployment.py --help
219219
git checkout stdlib-fpm
220220
fpm build --profile release
221221
```
222-
#### Runing the examples
222+
223+
224+
#### Installing with fpm
225+
226+
Either option you chose for building the `stdlib`, you can install it with:
227+
```sh
228+
fpm install --profile release
229+
```
230+
The command above will install the following files:
231+
- `libstdlib.a` into `~/.local/lib/` (Unix) or `C:\Users\<username>\AppData\Roaming\local\lib\` (Windows)
232+
- all the `.[s]mod` files produced by the compiler into `~/.local/include/` (Unix) or `C:\Users\<username>\AppData\Roaming\local\include\` (Windows)
233+
234+
You can change the installation path by setting the prefix option to `fpm`:
235+
```sh
236+
fpm install --profile release --prefix /my/custom/installation/path/
237+
```
238+
239+
You can use the `stdlib` by adding the `-lstdlib` flag to your compiler.
240+
If your prefix is a non standard path, add also:
241+
- `-L/my/custom/installation/path/lib`
242+
- `-I/my/custom/installation/path/include`
243+
244+
#### Running the examples
223245
You can run the examples with `fpm` as:
224246

225247
```sh

fpm.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ version = "VERSION"
33
license = "MIT"
44
author = "stdlib contributors"
55
maintainer = "@fortran-lang/stdlib"
6-
copyright = "2019-2021 stdlib contributors"
6+
copyright = "2019-2024 stdlib contributors"
7+
8+
[install]
9+
library = true
710

811
[dev-dependencies]
912
test-drive.git = "https://github.com/fortran-lang/test-drive"

0 commit comments

Comments
 (0)