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

suggest generic message generation target to depend on with add_dependencies #20

Closed
tkruse opened this issue Jan 26, 2013 · 4 comments
Closed
Assignees

Comments

@tkruse
Copy link
Member

tkruse commented Jan 26, 2013

The current design of genmsg requires users to depend on the xyz_gencpp target to build c++ libraries against messages in the same package. This requires users to know about gencpp and causes an ugly reference to gencpp internals in userland CMakeLists.txt.

See:
ros/catkin_tutorials#4

I suggest that instead genmsg should if possible provide a CMake target that users can depend on generically. If changed, this also affects

ros-infrastructure/catkin_pkg#26

@dirk-thomas
Copy link
Member

Could you please clarify what you mean. Perhaps by giving an example or sketching how you imagine the better approach.

@tkruse
Copy link
Member Author

tkruse commented Jan 26, 2013

If I understand cmake correctly, then currently the user has to write:

add_dependencies(some_target packagename_gencpp)

And instead of that, I would like users to be able to state:

add_dependencies(some_target packagename_messages)

or something similar, a target that is not generated by gencpp, but by genmsg. Not sure whether this also has technical benefits. I guess it also makes build a little slower, since fist all message generators would build messages, rather than only the c++ ones. But I hope the abstraction of message generation will make it easier for users to understand what is going on.

@dirk-thomas
Copy link
Member

A generic target could easily be added which itself depends on all generators. But I would rather teach the users to depend on the specific message generator target than on a generic one. As you already pointed out that makes definitely a difference because it adds significant useless dependencies. And since the user has to anyway specify a dep it should be directly the right one.

For the generic target I would use a more descriptive suffix like _generate_messages resulting in i.e. std_msgs_generate_messages. Else the meaning of that target std_msgs_messages would be difficult to understand again.

@tkruse
Copy link
Member Author

tkruse commented Jan 26, 2013

Maybe a compromise could be to give the current targets a more meaningfull
name, like packagename_generate_messages_cpp or something. We know what
gencpp means, but users seeing only message_generation and message_runtime
dependencies cannot guess that well.

On Sun, Jan 27, 2013 at 12:36 AM, Dirk Thomas notifications@github.comwrote:

A generic target could easily be added which itself depends on all
generators. But I would rather teach the users to depend on the specific
message generator target than on a generic one. As you already pointed out
that makes definitely a difference because it adds significant useless
dependencies. And since the user has to anyway specify a dep it should be
directly the right one.

For the generic target I would use a more descriptive suffix like
_generate_messages resulting in i.e. std_msgs_generate_messages. Else the
meaning of that target std_msgs_messages would be difficult to understand
again.


Reply to this email directly or view it on GitHubhttps://github.com//issues/20#issuecomment-12744535.

@ghost ghost assigned dirk-thomas Jan 29, 2013
PierrickKoch referenced this issue in PierrickKoch/robotpkg Feb 21, 2014
Changes since 0.3.10:

0.4.20 (2013-06-18)
-------------------
* generate pkg config extra files containing variables which list all message
  and service files (`#28 <https://github.com/ros/genmsg/issues/28>`_)

0.4.19 (2013-06-06)
-------------------
* improve error message for missing message dependencies
  (`#1 <https://github.com/ros/genmsg/issues/1>`_)
* fix generating duplicate include dirs for multiple add_message_files()
  invocations which broke generated lisp messages
  (`#27 <https://github.com/ros/genmsg/issues/27>`_)

0.4.18 (2013-03-08)
-------------------
* fix handling spaces in folder names
  (`ros/catkin#375 <https://github.com/ros/catkin/issues/375>`_)
* add targets with _generate_messages_LANG suffix
  (`#20 <https://github.com/ros/genmsg/issues/20>`_)
* pass all message generation target to EXPORTED_TARGETS
  (`#26 <https://github.com/ros/genmsg/issues/26>`_)
* improve error messages (`#22 <https://github.com/ros/genmsg/issues/22>`_)

0.4.17 (2013-01-19)
-------------------
* fix bug using ARGV in list(FIND) directly
  (`#18 <https://github.com/ros/genmsg/issues/18>`_)

0.4.16 (2013-01-13)
-------------------
* hide transitive message dependencies and pull them in automatically
  (`#15 <https://github.com/ros/genmsg/issues/15>`_)

0.4.15 (2012-12-21)
-------------------
* first public release for Groovy
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

No branches or pull requests

2 participants