waf: Only enable whitelist if compiling with G++

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
Ryan Friedman 2023-06-01 23:14:02 -06:00 committed by Andrew Tridgell
parent fd10bc35f0
commit 2750a1ad6f

View File

@ -777,10 +777,12 @@ class sitl(Board):
# whitelist of compilers which we should build with -Werror
gcc_whitelist = frozenset([
('11','3','0'),
])
('11','3','0'),
])
if cfg.env.CC_VERSION in gcc_whitelist or cfg.options.Werror:
werr_enabled_default = bool('g++' == cfg.env.COMPILER_CXX and cfg.env.CC_VERSION in gcc_whitelist)
if werr_enabled_default or cfg.options.Werror:
if not cfg.options.disable_Werror:
cfg.msg("Enabling -Werror", "yes")
if '-Werror' not in env.CXXFLAGS: