Skip to content

Conversation

@JorgeG94
Copy link

This fixes issue #1195

Copy link
Member

@perazz perazz 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 for this PR @JorgeG94. I believe it would be worthwhile to add a test routine for #elif cases in https://github.com/fortran-lang/fpm/blob/main/test/fpm_test/test_source_parsing.f90

@JorgeG94
Copy link
Author

Thank you for this PR @JorgeG94. I believe it would be worthwhile to add a test routine for #elif cases in https://github.com/fortran-lang/fpm/blob/main/test/fpm_test/test_source_parsing.f90

of course, I was enthralled that I fixed it that I just opened the PR. Let me tend to this

@perazz
Copy link
Member

perazz commented Oct 30, 2025

Unfortunately, fpm does not contain a full C preprocessor or even a source parser. A good approach for now is to add capability at user need

@JorgeG94
Copy link
Author

Unfortunately, fpm does not contain a full C preprocessor or even a source parser. A good approach for now is to add capability at user need

Excellent, I am writing the test now I shall push it in a second :)

@JorgeG94
Copy link
Author

@perazz I've extended the current test. Is this preferred or should I create two new unit tests, one for ifdef + elif and one for ifdef + elif + else ?

@JorgeG94
Copy link
Author

I thought about and one test per case is a better practice

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