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

Support of additional suffixes of Fortran files for preprocessing #979

Closed
wants to merge 1 commit into from

Conversation

jvdp1
Copy link
Member

@jvdp1 jvdp1 commented Jan 9, 2024

Potential issue: I noted that the option suffixes in the section preprocess in fpm.toml is not supported by fpm. Files with suffixes other than f90 or lower(F90) are currently ignored, even if additional suffixes are provided in fpm.toml

This PR will allow a support for additional suffixes for Fortran files that should be preproccessed (e.g. with cpp).

Related with #729

@jvdp1 jvdp1 requested review from awvwgk and a team January 13, 2024 12:01
@perazz
Copy link
Contributor

perazz commented Jan 13, 2024

You're right, it seems like the feature was never implemented.
I think to do so, instead of passing one more string array as a procedure argument in tens of places, it would be worth to replace the macros array in type(package_t) with complete preprocessor settings,

fpm/src/fpm_model.f90

Lines 139 to 140 in 80869ad

!> List of macros.
type(string_t), allocatable :: macros(:)

i.e. use the same preprocess_config_t as in the manifest

type package_t 
![...]
! type(string_t), allocatable :: macros(:) DELETE
type(preprocess_config_t) :: preprocess
![...]
end type package_t

I don't know why the original preprocess implementation had many options in the manifest not in the package, it seems like a straigthforward choice to store them all in the package settings too.

@jvdp1
Copy link
Member Author

jvdp1 commented Jan 14, 2024

I closes this PR in favour of #982

@jvdp1 jvdp1 closed this Jan 14, 2024
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.

2 participants