Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove AMENT_DEPENDENCIES from rcl_add_custom_gtest. #1119

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions rcl/test/cmake/rcl_add_custom_gtest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ set(rcl_add_custom_gtest_INCLUDED TRUE)
# Custom macro for adding a gtest in rcl.
#
# It also takes some of the arguments of ament_add_gtest as well as
# INCLUDE_DIRS, LIBRARIES, and AMENT_DEPENDENCIES which are passed to
# target_include_directories(), target_link_libraries(), and
# ament_target_dependencies() respectively.
# INCLUDE_DIRS and LIBRARIES which are passed to
# target_include_directories() and target_link_libraries(), respectively.
#
# :param target: the target name which will also be used as the test name
# :type target: string
Expand All @@ -41,16 +40,14 @@ set(rcl_add_custom_gtest_INCLUDED TRUE)
# :type INCLUDE_DIRS: list of strings
# :param LIBRARIES: list of libraries to link to the target
# :type LIBRARIES: list of strings
# :param AMENT_DEPENDENCIES: list of depends to pass ament_target_dependencies
# :type AMENT_DEPENDENCIES: list of strings
#
# @public
#
macro(rcl_add_custom_gtest target)
cmake_parse_arguments(_ARG
"SKIP_TEST;TRACE"
"TIMEOUT"
"SRCS;ENV;APPEND_ENV;APPEND_LIBRARY_DIRS;INCLUDE_DIRS;LIBRARIES;AMENT_DEPENDENCIES"
"SRCS;ENV;APPEND_ENV;APPEND_LIBRARY_DIRS;INCLUDE_DIRS;LIBRARIES"
${ARGN})
if(_ARG_UNPARSED_ARGUMENTS)
message(FATAL_ERROR "rcl_add_custom_gtest() called with unused arguments: ${_ARG_UNPARSED_ARGUMENTS}")
Expand Down Expand Up @@ -95,13 +92,6 @@ macro(rcl_add_custom_gtest target)
endif()
target_link_libraries(${target} ${_ARG_LIBRARIES})
endif()
# Add extra ament dependencies, if any.
if(_ARG_AMENT_DEPENDENCIES)
if(_ARG_TRACE)
message(STATUS " rcl_add_custom_gtest() AMENT_DEPENDENCIES: ${_ARG_AMENT_DEPENDENCIES}")
endif()
ament_target_dependencies(${target} ${_ARG_AMENT_DEPENDENCIES})
endif()
target_compile_definitions(${target}
PUBLIC "RMW_IMPLEMENTATION=${rmw_implementation}")
endif()
Expand Down