Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [install] section to fpm.toml #906

Merged
merged 6 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/`
jalvesz marked this conversation as resolved.
Show resolved Hide resolved
- all the `.[s]mod` files produced by the compiler into `~/.local/include/`

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
Loading