-
Notifications
You must be signed in to change notification settings - Fork 99
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
Dependency-level macro setting #952
Conversation
Can this be extended to macro definitions with a token string (no expectations to do it now, but just in terms of the manifest syntax)? For example ! bar.F90
print *, FOO
end $ gfortran -DFOO=42 bar.F90
$ ./a.out
42 Would the name |
Yes (untested) that syntax is possible: preprocess.cpp.macros=["FOO=42", "REAL_PRECISION=real64"] |
I think several keywords were possible, including |
Thank you for your comments @zoziha. |
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 @perazz , Looks good to me.
@zoziha I would wait for a few more days, and if there are no further comments, I think this is ready to merge. |
Merging. |
I'm opening a PR to address #950.
The request is to enable dependencies to have user-specified pre-processor macros.
I suggest to do it via the package manifest, under the
[dependencies]
section: each dependency can have an optionalpreprocess
node with the same contents and structure as the one in the package manifest:Seems a bit verbose, but I think it's important that the same syntax for preprocessing is used here or in the package manifest (BTW - cpp is the only supported thus far...)
Of course, it is the user's responsibility to ensure that user-enabled macros do not clash with package-level macros, there is no way to check that.
CC @zoziha @awvwgk @certik @arteevraina @henilp105 @minhqdao