Skip to content

Conversation

@gonzodepedro
Copy link
Collaborator

@gonzodepedro gonzodepedro commented Mar 31, 2021

If you look at the compiled jar their internal paths have the form: org.ros2.rcljava.*. While the sources jar has an internal path that starts in ${CMAKE_CURRENT_SOURCE_DIR}.
This is an attempt to fix that

Signed-off-by: Gonzalo de Pedro gonzalo@depedro.com.ar

Signed-off-by: Gonzalo de Pedro <gonzalo@depedro.com.ar>
Copy link

@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.

Is there something that isn't working, prompting this change?

cmake_parse_arguments(_add_source_jar
""
"OUTPUT_NAME"
"OUTPUT_NAME;JAR_ROOT_PATH"

Choose a reason for hiding this comment

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

On one hand, it seems like it should be the responsibility of the caller to remove any prefix paths, but on the other hand it's convenient to let the function take care of it. The downside of letting this function remove the prefix is that it is assuming that all source files have the same prefix.

I think it would safer to instead let the caller deal with the prefix and they can inform this function by passing a WORKING_DIRECTORY argument used when calling the jar command below.

Please add documentation for the new argument to the docblock above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants