Skip to content

Conversation

@JorgeG94
Copy link
Contributor

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
Contributor 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
Contributor 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
Contributor 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
Contributor Author

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

@JorgeG94
Copy link
Contributor Author

JorgeG94 commented Nov 4, 2025

The CI seems to have died because of an internal failure - can we trigger a rerun of the tests?

@perazz perazz merged commit 04a13b6 into fortran-lang:main Nov 5, 2025
40 of 44 checks passed
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