Skip to content

Commit e3487c5

Browse files
authored
Merge pull request #788 from semarie/cxx-doc
properly document FPM_CXX, FPM_CXXFLAGS and options
2 parents 3b37a58 + 5e6ac75 commit e3487c5

File tree

3 files changed

+23
-10
lines changed

3 files changed

+23
-10
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [ubuntu-latest, macos-latest, windows-latest]
24+
os: [ubuntu-latest, macos-11, windows-latest]
2525
gcc_v: [9] # Version of GFortran we want to use.
2626
include:
2727
- os: ubuntu-latest
2828
os-arch: linux-x86_64
2929
release-flags: --flag '--static -g -fbacktrace -O3'
3030

31-
- os: macos-latest
31+
- os: macos-11
3232
os-arch: macos-x86_64
3333
release-flags: --flag '-g -fbacktrace -O3'
3434

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)