From 9b680b5ea2bf24748c9aa2a395162a22e6340df4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez?= Date: Wed, 9 Oct 2024 12:58:34 +0200 Subject: [PATCH] Warn instead of fail when `dds.communication.dynamic_interfaces` cannot be built (#5310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refs #21826. Fix Signed-off-by: Ricardo González Moreno * Refs #21826. Apply suggestions Signed-off-by: Ricardo González Moreno --------- Signed-off-by: Ricardo González Moreno --- test/dds/communication/dyn_network/CMakeLists.txt | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/dds/communication/dyn_network/CMakeLists.txt b/test/dds/communication/dyn_network/CMakeLists.txt index 0d95ac665e0..1ea9b5e6eb0 100644 --- a/test/dds/communication/dyn_network/CMakeLists.txt +++ b/test/dds/communication/dyn_network/CMakeLists.txt @@ -16,7 +16,8 @@ message(STATUS "Configuring dynamic network interfaces tests") # Find docker find_program(DOCKER_EXECUTABLE docker) if(NOT DOCKER_EXECUTABLE) - message(FATAL_ERROR "Docker not found") + message(WARNING "Docker executable not found. dds.communication.dynamic_interfaces test won't be compiled.") + return() endif() set(SHELL_EXECUTABLE "") @@ -28,7 +29,8 @@ if(UNIX AND NOT(APPLE) AND NOT(QNXNTO) AND NOT(ANDROID)) # Find bash find_program(BASH_EXECUTABLE bash) if(NOT BASH_EXECUTABLE) - message(FATAL_ERROR "bash not found") + message(WARNING "bash executable not found. dds.communication.dynamic_interfaces test won't be compiled.") + return() endif() set(SHELL_EXECUTABLE ${BASH_EXECUTABLE}) @@ -36,11 +38,12 @@ if(UNIX AND NOT(APPLE) AND NOT(QNXNTO) AND NOT(ANDROID)) # Windows configurations elseif(WIN32) # We don't know which docker image to use for Windows yet - message(FATAL_ERROR "Windows not supported yet") - + message(WARNING "Windows not supported yet. dds.communication.dynamic_interfaces test won't be compiled.") + return() # Unsupported platform else() - message(FATAL_ERROR "Unsupported platform") + message(WARNING "Unsupported platform. dds.communication.dynamic_interfaces test won't be compiled.") + return() endif() # Configure TinyXML2 library path if installed in user library path