When using gcc, specifically gfortran
, there are many options to enable/disable different types of warnings, but as far as I can see they all relate to the language and source code being compiled. Is there a way to disable warnings that the compiler issues about overwritten, obsolete or incompatible flags?
In particular, I'd like to use -fmax-stack-var-size=1048576 -Werror
, so far so good. But if I now add -fopenmp
I get:
f951: Error: Flag ‘-fmax-stack-var-size=1048576’ overwrites ‘-frecursive’ implied by ‘-fopenmp’ [-Werror]f951: all warnings being treated as errors
I am OK with this (-fmax-stack-var-size=1048576
overwriting -frecursive
), so I'd like to disable this warning, or to make it not an error (without removing -Werror
). I could of course just remove the flag, but that complicates argument handling when they are dependent on options (e.g. with CMake), it would be much easier if I could just add -fopenmp -Wno-command-line
or whatever.