You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide explains the process of building *fpm* on a platform for the first time.
64
+
If your platform and architecture are already supported, download the binary from the [release page](https://github.com/fortran-lang/fpm/releases) instead.
28
65
29
66
#### Install Haskell
30
67
@@ -64,31 +101,26 @@ $ stack install
64
101
65
102
On Linux, the above command installs `fpm` to `${HOME}/.local/bin/`.
66
103
67
-
### Creating a new project
104
+
Now you can build the Fortran *fpm* version with
68
105
69
-
Creating a new *fpm* project is as simple as running the command
70
-
`fpm new project_name`. This will create a new folder in your current directory
71
-
with the following contents and initialized as a git repository.
106
+
```bash
107
+
$ cd fpm/
108
+
$ fpm build
109
+
```
72
110
73
-
*`fpm.toml` – with your project’s name and some default standard meta-data
74
-
*`README.md` – with your project’s name
75
-
*`.gitignore`
76
-
*`src/project_name.f90` – with a simple hello world subroutine
77
-
*`app/main.f90` (if `--with-executable` flag used) – a program that calls the subroutine
78
-
*`test/main.f90` (if `--with-test` flag used) – an empty test program
111
+
Test that everything is working as expected
79
112
80
-
### Building your Fortran project with fpm
113
+
```bash
114
+
$ fpm test
115
+
```
81
116
82
-
*fpm* understands the basic commands:
117
+
Finally, install the Fortran *fpm* version with
83
118
84
-
*`fpm build` – build your library, executables and tests
85
-
*`fpm run` – run executables
86
-
*`fpm test` – run tests
119
+
```bash
120
+
$ fpm run --runner cp -- ~/.local/bin
121
+
```
87
122
88
-
The command `fpm run` can optionally accept the name of the specific executable
89
-
to run, as can `fpm test`; like `fpm run specific_executable`. Command line
90
-
arguments can also be passed to the executable(s) or test(s) with the option
91
-
`--args "some arguments"`.
123
+
Or choose another location if you do not want to overwrite the bootstrapping version.
124
+
From now on you can rebuild *fpm* with your Fortran *fpm* version.
92
125
93
-
See additional instructions in the [Packaging guide](PACKAGING.md) or
0 commit comments