From c4cf3268cb4a77314c16b6531f3a7aba2108ba27 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 13 Nov 2023 12:35:11 +1100 Subject: [PATCH] waf: added --enable-networking and --enable-networking-tests --- Tools/ardupilotwaf/boards.py | 6 ++++++ wscript | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 26e88c1b16..2c5d221445 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -148,6 +148,12 @@ class Board: ) cfg.msg("Enabled custom controller", 'no', color='YELLOW') + if cfg.options.enable_networking: + env.CXXFLAGS += ['-DAP_NETWORKING_ENABLED=1'] + + if cfg.options.enable_networking_tests: + env.CXXFLAGS += ['-DAP_NETWORKING_TESTS_ENABLED=1'] + d = env.get_merged_dict() # Always prepend so that arguments passed in the command line get # the priority. diff --git a/wscript b/wscript index 6f4d9d81b1..393eab94c7 100644 --- a/wscript +++ b/wscript @@ -267,9 +267,14 @@ submodules at specific revisions. help="Enables GPS logging") 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', + help="Enable the networking code") + + g.add_option('--enable-networking-tests', action='store_true', + help="Enable the networking test code") + g.add_option('--enable-dronecan-tests', action='store_true', default=False, help="Enables DroneCAN tests in sitl")