diff --git a/mesonbuild/compilers/fortran.py b/mesonbuild/compilers/fortran.py index 2cdff36de441..428251560535 100644 --- a/mesonbuild/compilers/fortran.py +++ b/mesonbuild/compilers/fortran.py @@ -300,6 +300,9 @@ def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str] def get_preprocess_only_args(self) -> T.List[str]: return ['-cpp', '-EP'] + def get_werror_args(self) -> T.List[str]: + return ['-warn', 'errors'] + def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]: # TODO: needs default search path added return ['-lifcore', '-limf'] @@ -349,6 +352,9 @@ def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str] args.append('/stand:' + stds[std.value]) return args + def get_werror_args(self) -> T.List[str]: + return ['/warn:errors'] + def get_module_outdir_args(self, path: str) -> T.List[str]: return ['/module:' + path]