mirror of https://github.com/ArduPilot/ardupilot
waf: Fix disable werror to actually work
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
parent
819f93b778
commit
fd10bc35f0
|
@ -780,12 +780,17 @@ class sitl(Board):
|
|||
('11','3','0'),
|
||||
])
|
||||
|
||||
if cfg.options.Werror or cfg.env.CC_VERSION in gcc_whitelist:
|
||||
cfg.msg("Enabling -Werror", "yes")
|
||||
if '-Werror' not in env.CXXFLAGS:
|
||||
env.CXXFLAGS += [ '-Werror' ]
|
||||
if cfg.env.CC_VERSION in gcc_whitelist or cfg.options.Werror:
|
||||
if not cfg.options.disable_Werror:
|
||||
cfg.msg("Enabling -Werror", "yes")
|
||||
if '-Werror' not in env.CXXFLAGS:
|
||||
env.CXXFLAGS += [ '-Werror' ]
|
||||
else:
|
||||
cfg.msg("Enabling -Werror", "no")
|
||||
if '-Werror' in env.CXXFLAGS:
|
||||
env.CXXFLAGS.remove('-Werror')
|
||||
else:
|
||||
cfg.msg("Enabling -Werror", "no")
|
||||
cfg.msg("Enabling -Werror", "yes")
|
||||
|
||||
def get_name(self):
|
||||
return self.__class__.__name__
|
||||
|
|
5
wscript
5
wscript
|
@ -590,10 +590,9 @@ def configure(cfg):
|
|||
cfg.define('_GNU_SOURCE', 1)
|
||||
|
||||
if cfg.options.Werror:
|
||||
# print(cfg.options.Werror)
|
||||
if cfg.options.disable_Werror:
|
||||
raise ValueError("Cannot enable and disable Werror at the same time")
|
||||
else:
|
||||
cfg.options.Werror = not cfg.options.disable_Werror
|
||||
cfg.options.Werror = False
|
||||
|
||||
cfg.write_config_header(os.path.join(cfg.variant, 'ap_config.h'), guard='_AP_CONFIG_H_')
|
||||
|
||||
|
|
Loading…
Reference in New Issue