From 31b56c9b2c0029df1c198dc6a1505cad367d4f9c Mon Sep 17 00:00:00 2001 From: Marco Origlia Date: Mon, 9 Dec 2024 13:36:26 +0100 Subject: [PATCH 1/5] Add [install] section to fpm.toml Resolves fortran-lang/stdlib#782 --- fpm.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fpm.toml b/fpm.toml index bf8dfc530..f46285aed 100644 --- a/fpm.toml +++ b/fpm.toml @@ -5,6 +5,11 @@ author = "stdlib contributors" maintainer = "@fortran-lang/stdlib" copyright = "2019-2021 stdlib contributors" + +[install] +library = true + + [dev-dependencies] test-drive.git = "https://github.com/fortran-lang/test-drive" test-drive.tag = "v0.4.0" From 86af46e1d9e939eeb2193dc06f40b7fbe755b9e5 Mon Sep 17 00:00:00 2001 From: Marco Origlia <30799310+moriglia@users.noreply.github.com> Date: Tue, 10 Dec 2024 10:29:05 +0100 Subject: [PATCH 2/5] Update fpm.toml Co-authored-by: Jeremie Vandenplas --- fpm.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/fpm.toml b/fpm.toml index f46285aed..a26ce63ff 100644 --- a/fpm.toml +++ b/fpm.toml @@ -5,11 +5,9 @@ author = "stdlib contributors" maintainer = "@fortran-lang/stdlib" copyright = "2019-2021 stdlib contributors" - [install] library = true - [dev-dependencies] test-drive.git = "https://github.com/fortran-lang/test-drive" test-drive.tag = "v0.4.0" From 156b0e59d131cdf5bc1c1e65b0227c1acd2fe6cf Mon Sep 17 00:00:00 2001 From: Marco Origlia Date: Tue, 10 Dec 2024 11:28:43 +0100 Subject: [PATCH 3/5] Add installation instructions for FPM --- README.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b329d2713..4c8df45e4 100644 --- a/README.md +++ b/README.md @@ -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/` +- 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 From 95cd921763d14731955a0a59aa0898d8f2ac6699 Mon Sep 17 00:00:00 2001 From: Federico Perini Date: Tue, 10 Dec 2024 18:52:15 +0100 Subject: [PATCH 4/5] Update fpm.toml --- fpm.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpm.toml b/fpm.toml index a26ce63ff..e92871f98 100644 --- a/fpm.toml +++ b/fpm.toml @@ -3,7 +3,7 @@ version = "VERSION" license = "MIT" author = "stdlib contributors" maintainer = "@fortran-lang/stdlib" -copyright = "2019-2021 stdlib contributors" +copyright = "2019-2024 stdlib contributors" [install] library = true From f806becbedd0a7fdb352d9818db502debd833c5e Mon Sep 17 00:00:00 2001 From: Marco Origlia Date: Sat, 14 Dec 2024 17:36:07 +0100 Subject: [PATCH 5/5] Specify installation path for Windows in README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4c8df45e4..cbc6535cd 100644 --- a/README.md +++ b/README.md @@ -228,8 +228,8 @@ Either option you chose for building the `stdlib`, you can install it with: fpm install --profile release ``` The command above will install the following files: -- `libstdlib.a` into `~/.local/lib/` -- all the `.[s]mod` files produced by the compiler into `~/.local/include/` +- `libstdlib.a` into `~/.local/lib/` (Unix) or `C:\Users\\AppData\Roaming\local\lib\` (Windows) +- all the `.[s]mod` files produced by the compiler into `~/.local/include/` (Unix) or `C:\Users\\AppData\Roaming\local\include\` (Windows) You can change the installation path by setting the prefix option to `fpm`: ```sh