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

ament_add_gtest_executable: Uses old style target_link_libraries, should use keyword if possible? #405

Open
EricCousineau-TRI opened this issue Oct 18, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@EricCousineau-TRI
Copy link

In relation to comment here:
ros2/rosidl#400 (comment)

I found that the macro ament_add_gtest_executable seems to not use the newer keyword style of linking:

if(NOT ARG_SKIP_LINKING_MAIN_LIBRARIES)
target_link_libraries("${target}" ${GTEST_MAIN_LIBRARIES})
endif()

Relates #383

\cc @sloretz @IanTheEngineer

@sloretz
Copy link
Contributor

sloretz commented Nov 3, 2022

I found that the macro ament_add_gtest_executable seems to not use the newer keyword style of linking:

IIUC the keyword argument probably doesn't matter for executable targets since no downstream target is going to link against it, but CMake probably still requires it to be all keyword based or all plain (CMP0023). We could change this to PRIVATE on Rolling so it works with macros that pass a keyword argument to target_link_libraries().

@sloretz sloretz removed their assignment Feb 23, 2024
@sloretz sloretz added enhancement New feature or request help wanted Extra attention is needed labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants