-
Notifications
You must be signed in to change notification settings - Fork 108
bug: C preprocessor does not propagate directives to executables #775
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
Conversation
FYI fpm has a bug see fortran-lang/fpm#775 where C preprocessor flags do not propagate into the executable. The way to circumvent this is by passing both --flag and --c-flag options during run/build/etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick fix @gnikit! This looks good to me 🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sharing @gnikit .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we have one of the example packages testing this be behavior?
ok I'll push an example |
@awvwgk The existing
|
For example, setting a |
Sure we can add something like that. Do the examples run as part of our test suite? |
Yes, we can refer to add_example_package and add_example_to_run_in_ci, these example packages are declared and run in |
It seems that because there are no object files that need to be packaged into |
Yes, potentially. Another potential bug is that if you add |
@zoziha For now I might just add an empty stub .c file to circumvent this |
bc4b878
to
9d0b31d
Compare
Maybe moving Of course, your solution should also work @gnikit . |
Whatever you want, I'm okay either way. |
If everyone is happy with this you can go ahead and merge. I would leave my test setup as it is just so we can have commit 9d0b31d in the history to inspect why the OS X CI failed and whether it's an fpm bug. |
Fixes #774