Skip to content

--env switch lets you specify the prefix of the compiler-related environment variables#608

Closed
urbanjost wants to merge 20 commits into
fortran-lang:mainfrom
urbanjost:env
Closed

--env switch lets you specify the prefix of the compiler-related environment variables#608
urbanjost wants to merge 20 commits into
fortran-lang:mainfrom
urbanjost:env

Conversation

@urbanjost

Copy link
Copy Markdown
Contributor

This should address #576

@urbanjost

urbanjost commented Nov 15, 2021

Copy link
Copy Markdown
Contributor Author

manual.pdf
since there is extensive reorganization of the help text, here is an Adobe PDF version for review.

Also, something like this except want it to get the fpm version from the PR (need some help with this)
manpages.yml.txt

@urbanjost

Copy link
Copy Markdown
Contributor Author

After using this for a while, I think a more intuitive mode might be that FPM_COMPILER sets the compiler, but all the other values always are of the form FPM_MODIFIER_KEYWORD and that modifier defaults to the current compiler name, but are ignored unless the -env switch is used. If -env is used with no value, the FPM_compiler_name variables are used, if a blank is given as the value the plain keywords are used, if a modifier value is present it is used. That way only FPM_COMPILER is used by default. Thoughts?

@urbanjost

Copy link
Copy Markdown
Contributor Author

After trying several variants this is the most satisfying. It allows for using the "standard" variables only as an opt-in, but easily just by using

fpm  ... --env ""

it allows for named groups of variables to be used and provides an easy syntax for compiler-specific variables. All new variables are ignored by default. All variables begin with the FPM_ prefix. What variables are examined is reflected when the --verbose switch is present. So no newly introduced variables are used inadvertently as they are ignored unless --env is present.

manual_0.4.1.html.pdf

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant