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
Copy file name to clipboardExpand all lines: README.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -125,7 +125,7 @@ cmake -B build
125
125
You can pass additional options to CMake to customize the build.
126
126
Important options are
127
127
128
-
-`-G Ninja` to use the Ninja backend instead of the default Make backend. Other build backends are available with a similar syntax.
128
+
-`-G Ninja` to use the Ninja backend instead of the default Make backend. This makes it easy to specify compiler flags for the build. Other build backends are available with a similar syntax.
129
129
-`-DCMAKE_INSTALL_PREFIX` is used to provide the install location for the library. If not provided the defaults will depend on your operating system, [see here](https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html).
130
130
-`-DCMAKE_MAXIMUM_RANK` the maximum array rank procedures should be generated for.
131
131
The default value is chosen as 4.
@@ -134,9 +134,10 @@ Important options are
134
134
Compiling with maximum rank 15 can be resource intensive and requires at least 16 GB of memory to allow parallel compilation or 4 GB memory for sequential compilation.
135
135
-`-DBUILD_SHARED_LIBS` set to `on` in case you want link your application dynamically against the standard library (default: `off`).
136
136
137
-
For example, to configure a build using the Ninja backend and generating procedures up to rank 7, which is installed to your home directory use
137
+
For example, to configure a build using the Ninja backend while specifying compiler flags `FFLAGS`, generating procedures up to rank 7, and installing to your home directory, use
@@ -177,6 +178,8 @@ You can limit the maximum rank by setting ``-DMAXRANK=<num>`` in the ``FYPPFLAGS
177
178
make -f Makefile.manual FYPPFLAGS=-DMAXRANK=4
178
179
```
179
180
181
+
You can edit the compiler and its optimization flags by specifying the `FC` and `FFLAGS` variables in Makefile.manual. The default `FFLAGS` does not include any optimization, and you may want to add `-O3 -flto` to its definition.
182
+
180
183
### Build with [fortran-lang/fpm](https://github.com/fortran-lang/fpm)
181
184
182
185
Fortran Package Manager (fpm) is a package manager and build system for Fortran.
0 commit comments