Tools: ros2: Enable networking when needed

* DDS was built without networking so UDP stopped working
* Networking is automatically added when you want network tests
* --enable-networking should only be on sitl

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
Ryan Friedman 2023-11-15 17:41:01 -07:00 committed by Tom Pittenger
parent 7a5ee38b9f
commit ec2b47ba59
1 changed files with 5 additions and 1 deletions

View File

@ -410,12 +410,16 @@ def do_build(opts, frame_options):
if opts.enable_dds:
cmd_configure.append("--enable-dds")
if configure_target == 'sitl' and "--enable-networking" not in cmd_configure:
cmd_configure.append("--enable-networking")
if opts.enable_networking:
if opts.enable_networking and configure_target == 'sitl':
cmd_configure.append("--enable-networking")
if opts.enable_networking_tests:
cmd_configure.append("--enable-networking-tests")
if "--enable-networking" not in cmd_configure:
cmd_configure.append("--enable-networking")
pieces = [shlex.split(x) for x in opts.waf_configure_args]
for piece in pieces: