Document best practice for building executables with `ament_cmake`
- Langage dominant
- CMake
- Étoiles
- 125
- Forks
- 147
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
The ament_cmake user documentation only has a section for building a library, but not for building a binary. Some parts are not straightforward to adapt to that use case, for instance:
* Is there still a use case for `ament_export_targets`? Since it has an option `HAS_LIBRARY_TARGET` I think it also does something useful when there's no library target, but I'm not sure what – the motivating example for `ament_export_targets`, i.e. to be able to do `target_link_libraries(client_lib my_lib::my_lib)` applies only to libraries.
* The text that goes over the `install` command, and the command itself, sounds like could be used as-is for binaries. That is not the case, since `ros2 run` doesn't find executables in `bin`, only in `lib/${PROJECT_NAME}`.¹
If someone answers the first question and points out additional things to mention, I can try writing that section.
¹ In fact, the `install` call in the docs has destinations `lib` and `bin`, shouldn't that have `${PROJECT_NAME}` as well?
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.