Skip to content

Commit 35d936f

Browse files
committed
properly document FPM_CXX, FPM_CXXFLAGS and options
1 parent 93f6f70 commit 35d936f

File tree

2 files changed

+21
-8
lines changed

2 files changed

+21
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,13 @@ The table below lists the environment variables that control `fpm`'s choice of c
182182
compiler flags, archiver locations, and link flags, each of which can be overridden by
183183
passing `fpm` flags also shown in the table.
184184

185-
| Environment Variable | Defines | Overridden by |
186-
| :------------------- | :-------------------- | :------------- |
187-
| `FPM_FC` | Fortran compiler path | `--compiler` |
188-
| `FPM_CC` | C compiler path | `--c-compiler` |
189-
| `FPM_FFLAGS` | Fortran compiler flags| `--flag` |
190-
| `FPM_CFLAGS` | C compiler flags | `--c-flag` |
191-
| `FPM_AR` | Archiver path | `--archiver` |
192-
| `FPM_LDFLAGS` | Link flags | `--link-flag` |
185+
| Environment Variable | Defines | Overridden by |
186+
| :------------------- | :-------------------- | :--------------- |
187+
| `FPM_FC` | Fortran compiler path | `--compiler` |
188+
| `FPM_CC` | C compiler path | `--c-compiler` |
189+
| `FPM_CXX` | C++ compiler path | `--cxx-compiler` |
190+
| `FPM_FFLAGS` | Fortran compiler flags| `--flag` |
191+
| `FPM_CFLAGS` | C compiler flags | `--c-flag` |
192+
| `FPM_CXXFLAGS` | C++ compiler flags | `--cxx-flag` |
193+
| `FPM_AR` | Archiver path | `--archiver` |
194+
| `FPM_LDFLAGS` | Link flags | `--link-flag` |

src/fpm_command_line.f90

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,8 @@ module fpm_command_line
148148
' unless set by the environment variable FPM_FC. ',&
149149
' --c-compiler NAME Specify the C compiler name. Automatically determined by ',&
150150
' default unless set by the environment variable FPM_CC. ',&
151+
' --cxx-compiler NAME Specify the C++ compiler name. Automatically determined by',&
152+
' default unless set by the environment variable FPM_CXX. ',&
151153
' --archiver NAME Specify the archiver name. Automatically determined by ',&
152154
' default unless set by the environment variable FPM_AR. '&
153155
]
@@ -162,6 +164,9 @@ module fpm_command_line
162164
' --c-flag CFLAGS selects compile arguments specific for C source in the build.',&
163165
' The default value is set by the FPM_CFLAGS environment ',&
164166
' variable. ',&
167+
' --cxx-flag CFLAGS selects compile arguments specific for C++ source in the ',&
168+
' build. The default value is set by the FPM_CXXFLAGS ',&
169+
' environment variable. ',&
165170
' --link-flag LDFLAGS select arguments passed to the linker for the build. The ',&
166171
' default value is set by the FPM_LDFLAGS environment variable.'&
167172
]
@@ -181,6 +186,12 @@ module fpm_command_line
181186
' FPM_CFLAGS sets the arguments for the C compiler', &
182187
' will be overwritten by --c-flag command line option', &
183188
'', &
189+
' FPM_CXX sets the path to the C++ compiler used for the build,', &
190+
' will be overwritten by --cxx-compiler command line option', &
191+
'', &
192+
' FPM_CXXFLAGS sets the arguments for the C++ compiler', &
193+
' will be overwritten by --cxx-flag command line option', &
194+
'', &
184195
' FPM_AR sets the path to the archiver used for the build,', &
185196
' will be overwritten by --archiver command line option', &
186197
'', &

0 commit comments

Comments
 (0)