Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 20 commits into from

Conversation

urbanjost
Copy link
Contributor

This should address #576

@urbanjost
Copy link
Contributor Author

urbanjost commented Nov 15, 2021

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
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
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