Skip to content

Conversation

@Adityazzzzz
Copy link

This PR implements the fortran-standard field in the [package] table (addresses Issue #1131).

Summary: Users can now specify the Fortran standard (e.g., 2018, 2008) in fpm.toml. This value is passed to the compiler using the appropriate flag (currently implemented for GFortran as -std=f).

Changes:

  • src/fpm/manifest/package.f90: Added fortran_standard to package_config_t and updated parser/dump logic.
  • src/fpm_model.f90: Added fortran_standard to fpm_model_t.
  • src/fpm.f90:
  • Updated build_model to copy the standard from manifest to model.
  • Updated new_compiler_flags to append -std=f when using GFortran.

Testing:

  • Created a test project with fortran-standard = "2018".
  • Verified via fpm build --verbose that the flag -std=f2018 was passed to gfortran.

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