From 0eddfa9b8ac0812e3c7a7c1e8cf5e0f63816ed5b Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Thu, 26 Sep 2024 09:57:54 +0200 Subject: [PATCH] Only process idl interfaces Signed-off-by: Miguel Company --- test_communication/CMakeLists.txt | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test_communication/CMakeLists.txt b/test_communication/CMakeLists.txt index 9c678087..191e7da0 100644 --- a/test_communication/CMakeLists.txt +++ b/test_communication/CMakeLists.txt @@ -41,17 +41,21 @@ if(BUILD_TESTING) foreach(interface_file ${interface_files}) get_filename_component(interface_ns "${interface_file}" DIRECTORY) get_filename_component(interface_ns "${interface_ns}" NAME) + # Only process IDL interfaces string_ends_with("${interface_file}" ".idl" is_idl) - if(is_idl AND interface_ns STREQUAL "msg") + if(NOT is_idl) + continue() + endif() + # Decide category based on interface_ns + if(interface_ns STREQUAL "msg") list(APPEND message_files "${interface_file}") continue() endif() - string_ends_with("${interface_file}" ".srv" is_service) - if(is_service AND interface_ns STREQUAL "srv") + if(interface_ns STREQUAL "srv") list(APPEND service_files "${interface_file}") continue() endif() - if(is_idl AND interface_ns STREQUAL "action") + if(interface_ns STREQUAL "action") list(APPEND action_files "${interface_file}") continue() endif()