From 014e2183a43c11cb9ef1635514e0d32ab030c5b7 Mon Sep 17 00:00:00 2001 From: Michel Hidalgo Date: Mon, 8 Mar 2021 15:09:06 -0300 Subject: [PATCH] Collapse BUILD_TESTING clauses Signed-off-by: Michel Hidalgo --- rosidl_adapter/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rosidl_adapter/CMakeLists.txt b/rosidl_adapter/CMakeLists.txt index 643682935..b14b5518b 100644 --- a/rosidl_adapter/CMakeLists.txt +++ b/rosidl_adapter/CMakeLists.txt @@ -8,8 +8,10 @@ find_package(ament_cmake_python REQUIRED) ament_python_install_package(${PROJECT_NAME}) if(BUILD_TESTING) + find_package(ament_cmake_pytest REQUIRED) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() + ament_add_pytest_test(pytest test) endif() ament_package( @@ -25,8 +27,3 @@ install(PROGRAMS scripts/msg2idl.py scripts/srv2idl.py DESTINATION lib/${PROJECT_NAME}) - -if(BUILD_TESTING) - find_package(ament_cmake_pytest REQUIRED) - ament_add_pytest_test(pytest test) -endif()