Document best practice for building executables with `ament_cmake`
- Lingua principale
- CMake
- Stelle
- 125
- Fork
- 147
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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?
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.