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

Fix order in which *Export.cmake files are included #256

Merged
merged 1 commit into from May 14, 2020

Conversation

ivanpauno
Copy link
Contributor

In the following example:

add_library(libA ...)
....
add_library(libB libA)
...
ament_export_targets(libA libB)

When the package exporting this targets is find-packaged, it will fail with an error similar too:

CMake Warning at __FILE__:__LINE__ (find_package):
  Found package configuration file:

    __PACKAGE__Config.cmake

  but it set __PACKAGE___FOUND to FALSE so package "__PACKAGE__" is
  considered to be NOT FOUND.  Reason given by package:

  The following imported targets are referenced, but are missing:
  __PACKAGE__::libA

That's because the generated ament_cmake_export_targets-extras.cmake is including *Export.cmake files in reverse order, when it shouldn't (*Export.cmake files HAVE TO be included in the correct order, if not they will generate a failure).

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Contributor Author

  • Linux Build Status

@ivanpauno
Copy link
Contributor Author

I didn't see #252 before, but this is reverting that, and solving the extension point ordering correctly.

@ivanpauno
Copy link
Contributor Author

New CI, after correcting the approach rosidl_* PRs used:

  • Linux Build Status

@ivanpauno
Copy link
Contributor Author

New job after last commits:

  • Linux Build Status

@ivanpauno ivanpauno changed the title Fix the order in which *Export.cmake files are included Fix order in which *Export.cmake files are included May 13, 2020
@ivanpauno
Copy link
Contributor Author

  • Linux Build Status

@ivanpauno ivanpauno merged commit e16947c into master May 14, 2020
@delete-merged-branch delete-merged-branch bot deleted the ivanpauno/fix-target-export-config-include-order branch May 14, 2020 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in review Waiting for review (Kanban column)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants