-
Notifications
You must be signed in to change notification settings - Fork 103
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
Check that Fortran sources run; Robust Fortran features #1051
Conversation
This reverts commit fd3ebef.
Will merge soon as there are no comments. Thanks. |
Hi @perazz I wanted to ask something before and got busy in between, sorry.
Here, should it be understood that setting the option in the fortran table would be equivalent to adding a macro option under preprocessor.cpp ['-DWITH_QP'] for instance? in the sense that one should not need to added by hand? If that is the case LGTM. I did not fully understood the alternative. |
Thanks @jalvesz, the current PR does not address that yet as it just builds the internal capability to check that the current compiler supports
and fpm can check whether that is supported by the current compiler, and stop if it is not the case. |
Cristal clear! thanks! |
with_qp
, with_xdp
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!
This PR enables fpm to perform checks on supported Fortran features at project build time, with the aim to improve/enable Fortran features support.
check_fortran_source_runs
compiler property to run Fortran sources on-the-fly, similar to CMake's CheckFortranSourceRunswith_qp
fortran feature that checks for quad-precision real kind supportwith_xdp
fortran feature that checks for 80-bit extended-precision real kind supportLater, I plan to add conditional fortran features
quad-precision
andextended-precision
to thefortran
table. We should decide on a suitable logic: automated setting of preprocessor flags such asWITH_QP
andWITH_XDP
every time? or just if required in thefortran
table? etc.Context:
#864
fortran-lang/stdlib#821
cc: @jvdp1 @jalvesz @awvwgk @fortran-lang/fpm @fortran-lang/stdlib