Skip to content

Commit 2004b7c

Browse files
bgilbertdcbaker
authored andcommitted
compilers/fortran: fix werror options for Intel compilers
Unlike in the Intel C compiler, -Werror and /WX are not accepted.
1 parent 1684259 commit 2004b7c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mesonbuild/compilers/fortran.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,9 @@ def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]
300300
def get_preprocess_only_args(self) -> T.List[str]:
301301
return ['-cpp', '-EP']
302302

303+
def get_werror_args(self) -> T.List[str]:
304+
return ['-warn', 'errors']
305+
303306
def language_stdlib_only_link_flags(self, env: 'Environment') -> T.List[str]:
304307
# TODO: needs default search path added
305308
return ['-lifcore', '-limf']
@@ -349,6 +352,9 @@ def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]
349352
args.append('/stand:' + stds[std.value])
350353
return args
351354

355+
def get_werror_args(self) -> T.List[str]:
356+
return ['/warn:errors']
357+
352358
def get_module_outdir_args(self, path: str) -> T.List[str]:
353359
return ['/module:' + path]
354360

0 commit comments

Comments
 (0)