-
Notifications
You must be signed in to change notification settings - Fork 14
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
Build fixes #74
Build fixes #74
Conversation
This includes: * Declare generated source files in include/ as GENERATED in TREXIO_DEVEL mode. * Generate include/config.h with version components from project delcaration, and for good measure have src/templates_front/build.sh set version components to 0 if not present.
This includes: * Define kind of arguments of bind(C) procedures using the relevant C types provided by iso_c_binding. * Replaced "call exit(1)" with "error stop 1". * Fixed a couple of implicit type conversions between 4-/8-byte integers. The first two fix compilation of the Fortran module with -std=f2008.
Thanks Pablo! |
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.
Thank you for these fixes @plopezrios !
I have only one suggestion for the CMake part and one comment regarding the use c_long
in the Fortran interface.
@plopezrios thank you for the update! Fine with me. In the end, I think we should roll back to Fortran-specific We can probably merge this PR as it is now and then roll back on the |
According to the final draft of the Fortran 2008 standard (https://j3-fortran.org/doc/year/10/10-007r1.pdf ; see section 15.3 and table 15.2) using
The Fortran module, by construction (and according to Should you still decide to revert the changes, mind that some of them (changes specifying the |
OK. so in that case the best solution is probably to generate 2 different fortran modules: one with |
Just to be clear, Regarding the use of |
Yes, I think that this move of the Fortran standard was one of the many stupid actions they took!
So I guess we should use the |
Yup, that would make the code portable, but it would still run into the problem that kind constants that do not come from I don't see that there is anything to lose from having a single Fortran module with the |
I get it, you are right. We should use
Suppose that |
My main line of reasoning here is that both |
@plopezrios you are right about the C interoperability, I did not know about it. Thank you for the detailed explanation! Then it seems that using |
We all agree! I am doing a next PR for that. ready in a few minutes... |
To be fair, I didn't know much about this either until gfortran forced me to go read about it :) |
Fixes to get cmake to work as advertised and to suppress gfortran 11 warnings