From 5f67904d1987afbdc35b31c68b4e2f42ccc20b6f Mon Sep 17 00:00:00 2001 From: Ryan Friedman Date: Mon, 16 Sep 2024 20:54:51 -0600 Subject: [PATCH] Tools: Expose arbitrary waf configure and build args * This allows someone using colcon full control over the build Signed-off-by: Ryan Friedman --- Tools/ros2/ardupilot_sitl/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tools/ros2/ardupilot_sitl/CMakeLists.txt b/Tools/ros2/ardupilot_sitl/CMakeLists.txt index d1d2017463512..5759fca6108e7 100644 --- a/Tools/ros2/ardupilot_sitl/CMakeLists.txt +++ b/Tools/ros2/ardupilot_sitl/CMakeLists.txt @@ -18,6 +18,9 @@ option(ARDUPILOT_DISABLE_WATCHDOG "Build with watchdog disabled" OFF) option(ARDUPILOT_ENABLE_DDS "Enable the DDS client" ON) option(ARDUPILOT_ENABLE_NETWORKING_TESTS "Enable the networking test code" OFF) option(ARDUPILOT_ENABLE_PPP "Enable PPP networking" OFF) +set(ARDUPILOT_WAF_CONFIGURE_ARGS "" CACHE STRING "Arbitrary waf configure arguments") +set(ARDUPILOT_WAF_BUILD_ARGS "" CACHE STRING "Arbitrary waf build arguments") + # NOTE: look for `waf` and set source and build directories to top level. # ${PROJECT_SOURCE_DIR} = ./Tools/ros2/ardupilot @@ -45,11 +48,12 @@ add_custom_target(ardupilot_configure ALL ${WAF_ENABLE_DDS} ${WAF_ENABLE_NETWORKING_TESTS} ${WAF_ENABLE_PPP} + ${ARDUPILOT_WAF_CONFIGURE_ARGS} WORKING_DIRECTORY ${ARDUPILOT_ROOT} ) add_custom_target(ardupilot_build ALL - ${WAF_COMMAND} build --enable-dds ${WAF_CONFIG} + ${WAF_COMMAND} build --enable-dds ${WAF_CONFIG} ${ARDUPILOT_WAF_BUILD_ARGS} WORKING_DIRECTORY ${ARDUPILOT_ROOT} ) add_dependencies(ardupilot_build ardupilot_configure)