diff options
Diffstat (limited to 'mesonbuild/compilers/fortran.py')
| -rw-r--r-- | mesonbuild/compilers/fortran.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index b004727b4..72c9a5a97 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -121,7 +121,7 @@ class FortranCompiler(CLikeCompiler, Compiler): self.make_option_name(key), 'Fortran language standard to use', 'none', - ['none']) + choices=['none']) return opts @@ -281,8 +281,7 @@ class GnuFortranCompiler(GnuCompiler, FortranCompiler): fortran_stds += ['f2008'] if version_compare(self.version, '>=8.0.0'): fortran_stds += ['f2018'] - key = self.form_compileropt_key('std') - opts[key].choices = ['none'] + fortran_stds + self._update_language_stds(opts, fortran_stds) return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: @@ -338,9 +337,7 @@ class ElbrusFortranCompiler(ElbrusCompiler, FortranCompiler): def get_options(self) -> 'MutableKeyedOptionDictType': opts = super().get_options() - fortran_stds = ['f95', 'f2003', 'f2008', 'gnu', 'legacy', 'f2008ts'] - key = self.form_compileropt_key('std') - opts[key].choices = ['none'] + fortran_stds + self._update_language_stds(opts, ['f95', 'f2003', 'f2008', 'gnu', 'legacy', 'f2008ts']) return opts def get_module_outdir_args(self, path: str) -> T.List[str]: @@ -418,8 +415,7 @@ class IntelFortranCompiler(IntelGnuLikeCompiler, FortranCompiler): def get_options(self) -> 'MutableKeyedOptionDictType': opts = super().get_options() - key = self.form_compileropt_key('std') - opts[key].choices = ['none', 'legacy', 'f95', 'f2003', 'f2008', 'f2018'] + self._update_language_stds(opts, ['none', 'legacy', 'f95', 'f2003', 'f2008', 'f2018']) return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: @@ -473,8 +469,7 @@ class IntelClFortranCompiler(IntelVisualStudioLikeCompiler, FortranCompiler): def get_options(self) -> 'MutableKeyedOptionDictType': opts = super().get_options() - key = self.form_compileropt_key('std') - opts[key].choices = ['none', 'legacy', 'f95', 'f2003', 'f2008', 'f2018'] + self._update_language_stds(opts, ['none', 'legacy', 'f95', 'f2003', 'f2008', 'f2018']) return opts def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: |
