diff options
-rw-r--r-- | mesonbuild/compilers/fortran.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 0d94297..8b2f73e 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -32,7 +32,7 @@ from .mixins.pgi import PGICompiler from .. import mlog from mesonbuild.mesonlib import ( - EnvironmentException, MachineChoice, LibType + EnvironmentException, MesonException, MachineChoice, LibType ) if typing.TYPE_CHECKING: @@ -51,6 +51,12 @@ class FortranCompiler(CLikeCompiler, Compiler): def get_display_language(self): return 'Fortran' + def has_function(self, funcname, prefix, env, *, extra_args=None, dependencies=None): + raise MesonException('Fortran does not have "has_function" capability.\n' + 'It is better to test if a Fortran capability is working like:\n\n' + "meson.get_compiler('fortran').links('block; end block; end program')\n\n" + 'that example is to see if the compiler has Fortran 2008 Block element.') + def sanity_check(self, work_dir: Path, environment): """ Check to be sure a minimal program can compile and execute |