mirror of https://github.com/ArduPilot/ardupilot
waf: enable networking by default when supported, and disable with --disable-networking
This commit is contained in:
parent
31fd43ba25
commit
aec605b020
|
@ -148,8 +148,8 @@ class Board:
|
||||||
)
|
)
|
||||||
cfg.msg("Enabled custom controller", 'no', color='YELLOW')
|
cfg.msg("Enabled custom controller", 'no', color='YELLOW')
|
||||||
|
|
||||||
if cfg.options.enable_networking:
|
if cfg.options.disable_networking:
|
||||||
env.CXXFLAGS += ['-DAP_NETWORKING_ENABLED=1']
|
env.CXXFLAGS += ['-DAP_NETWORKING_ENABLED=0']
|
||||||
|
|
||||||
if cfg.options.enable_networking_tests:
|
if cfg.options.enable_networking_tests:
|
||||||
env.CXXFLAGS += ['-DAP_NETWORKING_TESTS_ENABLED=1']
|
env.CXXFLAGS += ['-DAP_NETWORKING_TESTS_ENABLED=1']
|
||||||
|
@ -674,6 +674,9 @@ class sitl(Board):
|
||||||
'-Werror=missing-declarations',
|
'-Werror=missing-declarations',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
if not cfg.options.disable_networking:
|
||||||
|
env.CXXFLAGS += ['-DAP_NETWORKING_ENABLED=1']
|
||||||
|
|
||||||
if cfg.options.ubsan or cfg.options.ubsan_abort:
|
if cfg.options.ubsan or cfg.options.ubsan_abort:
|
||||||
env.CXXFLAGS += [
|
env.CXXFLAGS += [
|
||||||
"-fsanitize=undefined",
|
"-fsanitize=undefined",
|
||||||
|
|
4
wscript
4
wscript
|
@ -269,8 +269,8 @@ submodules at specific revisions.
|
||||||
g.add_option('--enable-dds', action='store_true',
|
g.add_option('--enable-dds', action='store_true',
|
||||||
help="Enable the dds client to connect with ROS2/DDS.")
|
help="Enable the dds client to connect with ROS2/DDS.")
|
||||||
|
|
||||||
g.add_option('--enable-networking', action='store_true',
|
g.add_option('--disable-networking', action='store_true',
|
||||||
help="Enable the networking code")
|
help="Disable the networking API code")
|
||||||
|
|
||||||
g.add_option('--enable-networking-tests', action='store_true',
|
g.add_option('--enable-networking-tests', action='store_true',
|
||||||
help="Enable the networking test code. Automatically enables networking.")
|
help="Enable the networking test code. Automatically enables networking.")
|
||||||
|
|
Loading…
Reference in New Issue