waf: do not -Werror=suggest-override on uavcan-enabled boards

uavcan doesn't have all of the required override keywords

SITL will still die without the keyword
This commit is contained in:
Peter Barker 2019-08-13 16:27:46 +10:00 committed by Peter Barker
parent 67bf00c1c3
commit 1574464543
2 changed files with 7 additions and 1 deletions

View File

@ -226,7 +226,7 @@ class Board:
'-Werror=unused-but-set-variable'
]
(major, minor, patchlevel) = cfg.env.CC_VERSION
if int(major) >= 5 and int(minor) > 1:
if int(major) >= 5 and int(minor) > 1 and not self.with_uavcan:
env.CXXFLAGS += [
'-Werror=suggest-override',
]

View File

@ -190,6 +190,12 @@ def setup_can_build(cfg):
'-DUAVCAN_STM32_NUM_IFACES=2'
]
(major, minor, patchlevel) = cfg.env.CC_VERSION
if int(major) >= 5 and int(minor) > 1:
env.CXXFLAGS += [
'-Wno-error=suggest-override',
]
env.DEFINES += [
'UAVCAN_CPP_VERSION=UAVCAN_CPP03',
'UAVCAN_NO_ASSERTIONS=1',