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

Set _FOUND to trick ament_target_dependencies() for test #396

Merged
merged 2 commits into from
Jul 25, 2019

Conversation

sloretz
Copy link
Contributor

@sloretz sloretz commented Jul 24, 2019

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
@sloretz sloretz added the bug Something isn't working label Jul 24, 2019
@sloretz sloretz self-assigned this Jul 24, 2019
Copy link
Member

@jacobperron jacobperron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What call to ament_target_dependencies is causing the issue?

@sloretz
Copy link
Contributor Author

sloretz commented Jul 25, 2019

What call to ament_target_dependencies is causing the issue?

@jacobperron this invokes the generator for the test messages, including the generator in this package.

rosidl_generate_interfaces(${PROJECT_NAME}_interfaces ${message_files}

so this is called,

ament_target_dependencies(${rosidl_generate_interfaces_TARGET}${_target_suffix}
"rosidl_generator_c"
"rosidl_typesupport_interface")

but rosidl_generator_c is still being built so it can't have been find_package()'d. These variables are tricking ament_target_dependencies() into thinking it was find_package()'d anyways.

set(rosidl_generator_c_FOUND "1")
set(rosidl_generator_c_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
set(rosidl_generator_c_LIBRARIES "${PROJECT_NAME}")

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
@sloretz sloretz merged commit 9f72de1 into master Jul 25, 2019
@delete-merged-branch delete-merged-branch bot deleted the sloretz/fix-not-packags-accepted branch July 25, 2019 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants