-
Notifications
You must be signed in to change notification settings - Fork 73
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
genmsg-extras: Added a BASE_DIR argument to add_service_files to be able... #51
Conversation
…ble to compile autogenerated messages.
Please describe your use case for this patch. It also looks like that the argument is very similar to the existing argument |
Okay, I'm sorry that I didn't provide them before. It is quite similar to A typical usecase would be autogenerated service files. I am currently writing a database API, which uses ROS services. Since I don't want to generate a service for each message used in our system, I wanted to create an autogenerator. This could be used like this: autogenerate_srvs(autogen_srvs a b c d)
add_service_files(
FILES ${autogen_srvs}
BASE_DIR ${CMAKE_CURRENT_BINARY_DIR}
) where autogenerate_srvs would write some services (for each argument) in There are some (hacky) ways around this, but I think it is a good idea to integrate it, especially because |
The I don't think we should mimic the same (actually pretty weird) arguments to |
I actually tried Is |
…now handles absolute and relative paths.
I pushed the new changes. DIRECTORY now handles absolute and relative paths. I also added a commit, which removes the BASE_DIR argument, so you can omit it, if necessary. |
I forgot to mention, that deleting BASE_DIR will break action files at the moment. I will try to fix this. I also created a repository, which tests the different calling methods: https://github.com/dreuter/test_genmsg |
My pull request in common_msgs should fix the problem mentioned above. See: ros/common_msgs#43 |
@@ -74,7 +74,7 @@ macro(_prepend_path ARG_PATH ARG_FILES ARG_OUTPUT_VAR) | |||
endmacro() | |||
|
|||
macro(add_message_files) | |||
cmake_parse_arguments(ARG "NOINSTALL" "DIRECTORY;BASE_DIR" "FILES" ${ARGN}) | |||
cmake_parse_arguments(ARG "NOINSTALL" "DIRECTORY" "FILES" ${ARGN}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing public API from an already release distro is not feasible.
I fixed this. The public API now remains unchanged... Could you please merge it? |
Thank you for the patch - I committed a modified version which is a bit more concise: 80c0d2a |
... to compile autogenerated messages.