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

Merged
merged 3 commits into from
Jan 21, 2024

Conversation

perazz
Copy link
Contributor

@perazz perazz commented Jan 13, 2024

This PR proposes a more consistent implementation of the very useful PR #979, thank you @jvdp1 .

  • In package_t, the macros array is replaced by a full preprocess_config_t structure, more future proof.
  • In the preprocess_cpp_suffixes example, I've added a test program so we're sure that the module is not only created, but also actually used.

cc @jvdp1 @arteevraina @henilp105 @fortran-lang/fpm

support preprocessor suffixes

fix for allocatable string

replace function wiht subroutine

fix allocations

check present

use macros only if allocated
@perazz perazz assigned perazz and unassigned perazz Jan 13, 2024
Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @perazz . This is indeed a beter solution then #979 , and I believe it is a step forward to support preprocessors others than cpp.

Note: with these changes I can compile stdlib using fpm and @arteevraina wrapper script

@perazz
Copy link
Contributor Author

perazz commented Jan 15, 2024

Thank you @jvdp1, let's wait a few more days to see if there are further comments, and if not, I will merge.

src/fpm_sources.f90 Outdated Show resolved Hide resolved
Co-authored-by: Jeremie Vandenplas <jeremie.vandenplas@gmail.com>
@perazz perazz merged commit 31ea224 into fortran-lang:main Jan 21, 2024
23 checks passed
@perazz perazz deleted the support_prefixes branch January 21, 2024 09:46
@perazz
Copy link
Contributor Author

perazz commented Jan 21, 2024

Merged.

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.

None yet

3 participants