-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
WIP: Fortran dialects default FLAGS and PATH if not set #4688
base: master
Are you sure you want to change the base?
Conversation
The manpage has always said that for a given dialect (e.g. F90), to set FORTRANFLAGS and FORTRANPATH unless you need values that are unique to just that dialect, in which case you can set the dialect-specific ones (e.g. F90FLAGS and/or F90PATH). However, the implementation never actually picked up the generic settings if the dialect-specific settings were not given. This change now picks up the defaults if the dialect does not have a value set. Signed-off-by: Mats Wichmann <[email protected]>
Hmmm, fails some tests on Windows:
Will investigate. Update: this may be a previously unexploited hole in a stub tool used by the test, since this is a flag-handling test that doesn't need a real compiler - |
After the change to default to generic dialect's flags/paths, if a test did an Append to *FLAGS, it would do string concatenation with the un-substituted default, as that looks like a string. That is, if $SHF90FLAGS is '$SHFORTRANFLAGS', then appending '-x' became '$SHFORTRANFLAGS-x' rather than ['$SHFORTRANFLAGS', '-x']. This failed tests on Windows, though for some reason I'm not clear on, not on Linux. Turning the initial assignment to a CLVar takes care of this. Signed-off-by: Mats Wichmann <[email protected]>
Nope, wasn't a fault of the tool, but a side effect of defaulting to an un-substituted string and then the tests doing |
Let's try to summarize where things are now: For If a flags cvar is defaulted to env.Append(SHF90FLAGS='-x', SHFORTRANFLAGS='-y') And then count on only I don't see a good way to resolve that - you can argue several different approaches as the "right" behavior in the face of the possibility of changes after the possible defaulting takes place, which happens at tool setup time. Not just appending, but overrides. So I think it's better to forget about it and just rewrite docs so For the |
Signed-off-by: Mats Wichmann <[email protected]>
@bdbaddog pushed a revision to the f90 dialect docs - this reflects the proposal to describe |
The manpage has always said that for a given dialect (e.g. F90), you should set
FORTRANFLAGS
andFORTRANPATH
unless you need values that are unique to just that dialect, in which case you can set the dialect-specific ones (e.g.F90FLAGS
and/orF90PATH
). However, the implementation never actually picked up the generic settings if the dialect-specific settings were not given. This change now picks up the defaults if the dialect does not have a value set.Manpage section on Fortran dialects is reworded for greater clarity.
Fixes #4686
Contributor Checklist:
CHANGES.txt
andRELEASE.txt
(and read theREADME.rst
).