Skip to content

Fortran feature table #722

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

Open
awvwgk opened this issue Jul 15, 2022 · 3 comments
Open

Fortran feature table #722

awvwgk opened this issue Jul 15, 2022 · 3 comments
Labels
specification Issue regarding fpm manifest and model

Comments

@awvwgk
Copy link
Member

awvwgk commented Jul 15, 2022

In light of supporting #577 and other related features which require to toggle “features” we should have a better mechanism than lumping things together in the build table.

An easy option would be to have a features table, with booleans

[features]
implicit-typing = true

However, we might need more than a binary system, so a feature which is either on, off or on some automatic value

[features]
implicit-typing = "enabled"  # options are "enabled", "disabled", "default" (compiler specific)

A more complex setup could be a fortran table, which also allows to select the standard (with default being what the compiler uses without options, fpm being our community standard and f2018 the strict standard). Features could be instead of a subtable also an array of strings (easier to realize in a subtable than in the root table).

[fortran]
standard = "default"  # "fpm", "f2018", "f2008", ...
features = [
  "+implicit-typing",  # or "-implict-typing"
]
@awvwgk awvwgk added the specification Issue regarding fpm manifest and model label Jul 15, 2022
@awvwgk
Copy link
Member Author

awvwgk commented Jul 18, 2022

In cargo it is done using a features table: https://doc.rust-lang.org/cargo/reference/features.html, but they have also an array of strings to enable unstable features: https://doc.rust-lang.org/cargo/reference/unstable.html.

@ivan-pi
Copy link
Member

ivan-pi commented Jul 21, 2022

Would this down the line mean also a [c-lang] table, e.g. to select C dialects? (https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#C-Dialect-Options)

@awvwgk
Copy link
Member Author

awvwgk commented Jul 21, 2022

In this case it would make sense to stay with a features table where one can select the Fortran and C standard using a keyword argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
specification Issue regarding fpm manifest and model
Projects
None yet
Development

No branches or pull requests

2 participants