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

export library path for library interfaces #135

Merged
merged 2 commits into from May 18, 2018

Conversation

dirk-thomas
Copy link
Contributor

Fixes #132. Connect to #132.

CI builds (without repeating tests):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@dirk-thomas dirk-thomas added bug Something isn't working in review Waiting for review (Kanban column) labels May 9, 2018
@dirk-thomas dirk-thomas self-assigned this May 9, 2018
@dirk-thomas
Copy link
Contributor Author

While this patch work for e.g. ecl_exceptions it is not correct. The ament_export_interfaces macro expects export names as arguments - not target names. So ecl_exceptions is passing the wrong arguments to it.

I am not yet sure how we can get information about the targets from the export names...

@dirk-thomas dirk-thomas added in progress Actively being worked on (Kanban column) and removed in review Waiting for review (Kanban column) labels May 9, 2018
@dirk-thomas
Copy link
Contributor Author

I updated the patch to introduce the option HAS_LIBRARY_TARGET to the CMake function ament_export_interfaces.

Please see ament/ament_index#30 for a usage example.

@dirk-thomas dirk-thomas added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels May 10, 2018
@dirk-thomas
Copy link
Contributor Author

A new round of CI builds (again without repeating tests):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@dirk-thomas
Copy link
Contributor Author

@stonier / @clalancette can either of you try / review this?

@clalancette
Copy link
Contributor

I'm trying it out now, will report back in a bit.

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

I tested this out with the problematic packages, and found that adding HAS_LIBRARY_TARGET fixes the issues we encountered. I have one comment about improving the documentation, but it otherwise looks good to me, so I'll approve.

@@ -19,6 +19,9 @@
# ``install(TARGETS ... EXPORT name ...)``.
# The ``install(EXPORT ...)`` invocation is handled by this macros.
#
# :param HAS_LIBRARY_TARGET: if set, an environment variable is being defined
Copy link
Contributor

Choose a reason for hiding this comment

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

This might be a bit clearer as:

:param HAS_LIBRARY_TARGET: if set, an environment variable will be defined
so the library can be found by runtime executables

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My text contains a wrong word: executables was probably a left over from previous iterations.

For your suggested text the question would then be: what are "runtime executables"?

Copy link
Contributor

Choose a reason for hiding this comment

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

I was wondering the same thing, I think I mistook the meaning. How about:

:param HAS_LIBRARY_TARGET: if set, an environment variable will be defined
so the library can be found at runtime

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in c0075ba.

@dirk-thomas dirk-thomas merged commit 257c293 into master May 18, 2018
@dirk-thomas dirk-thomas deleted the export_library_path_for_interfaces branch May 18, 2018 23:14
@dirk-thomas dirk-thomas removed the in review Waiting for review (Kanban column) label May 18, 2018
@stonier
Copy link

stonier commented May 19, 2018

Thanks @clalancette. Been meaning to catch up on this each night this week, just never got there.

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.

None yet

3 participants