Skip to content

Commit

Permalink
Merge pull request #906 from moriglia/master
Browse files Browse the repository at this point in the history
Add `[install]` section to `fpm.toml`
  • Loading branch information
jalvesz authored Dec 19, 2024
2 parents cc30d4c + f806bec commit 35e7146
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,29 @@ python config/fypp_deployment.py --help
git checkout stdlib-fpm
fpm build --profile release
```
#### Runing the examples


#### Installing with fpm

Either option you chose for building the `stdlib`, you can install it with:
```sh
fpm install --profile release
```
The command above will install the following files:
- `libstdlib.a` into `~/.local/lib/` (Unix) or `C:\Users\<username>\AppData\Roaming\local\lib\` (Windows)
- all the `.[s]mod` files produced by the compiler into `~/.local/include/` (Unix) or `C:\Users\<username>\AppData\Roaming\local\include\` (Windows)

You can change the installation path by setting the prefix option to `fpm`:
```sh
fpm install --profile release --prefix /my/custom/installation/path/
```

You can use the `stdlib` by adding the `-lstdlib` flag to your compiler.
If your prefix is a non standard path, add also:
- `-L/my/custom/installation/path/lib`
- `-I/my/custom/installation/path/include`

#### Running the examples
You can run the examples with `fpm` as:

```sh
Expand Down
5 changes: 4 additions & 1 deletion fpm.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ version = "VERSION"
license = "MIT"
author = "stdlib contributors"
maintainer = "@fortran-lang/stdlib"
copyright = "2019-2021 stdlib contributors"
copyright = "2019-2024 stdlib contributors"

[install]
library = true

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

0 comments on commit 35e7146

Please sign in to comment.