ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

difference between install and executable in CMakeLists.

asked 2018-06-18 03:15:09 -0600

Alsing gravatar image

updated 2018-06-18 04:14:37 -0600

I am cleaning up my ros code base, applying catkin_lint and reading the C++ ROS Style Guide etc etc, soon going to implement unit test and have clang-check look at it.

Catkin_lint warns that I dont have any targets installed, which is true, because i have only add_executable(...). I have tried understanding the catkin documentation explaining between install(...) and add_executable(...) from catkin documentation

What is the observable/performance difference between installing and adding the executable?

Edit: Print of the error i got.

ryan@Macbuntu:~/catkin_ws/src/$ catkin_lint guide_pkg -W2
guidance: warning: target 'power' is not installed
guidance: warning: target 'pursuit' is not installed
guidance: warning: target 'goal' is not installed
guidance: warning: target 'kill_goal' is not installed
guidance: warning: target 'speed_cmd_mux' is not installed
guidance: notice: meaningless package description 'The guide package'
guidance: notice: target name 'power' might not be sufficiently unique
guidance: notice: target name 'pursuit' might not be sufficiently unique
guidance: notice: target name 'goal' might not be sufficiently unique
guidance: notice: target name 'kill_goal' might not be sufficiently unique
guidance: notice: target name 'speed_cmd_mux' might not be sufficiently unique
guidance: CMakeLists.txt(6): notice: list COMPONENTS should be sorted
catkin_lint: checked 1 packages and found 20 problems
edit retag flag offensive close merge delete

Comments

Can please update your question with a copy and paste of the warnings that you're getting?

jayess gravatar image jayess  ( 2018-06-18 04:08:25 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-06-18 04:22:38 -0600

gvdhoorn gravatar image

updated 2018-06-18 04:24:31 -0600

What is the observable/performance difference between installing and adding the executable?

None, as there isn't any. Your question presumes a relationship between building binaries and installing them that isn't there.

The biggest difference is in where the binaries (and other files, as you can install many more files, not just binaries) end up:

The difference between those two could be described as the former (devel) still being part of your Catkin workspace (and essentially stuck there, ie: you cannot just move it around), while the latter (install) is completely stand-alone, and could (in theory) be tarred-up and deployed to another machine.

The devel space is therefore something you use on your own machine (ie: source /path/to/catkin_ws/devel/setup.bash), while the install space is typically only used when deploying packages (either when building them to release them as .deb/.rpm/something else, or when deploying locally, for an overlay setup fi).


catkin_lint warns about your CMakeLists.txt not having any install(..) commands as it typically leads to all sorts of problems if/when you ever share your packages with other developers - either inside your own organisation or with the ROS community itself. Without install(..) statements the buildfarm will not be able to create proper debian packages out of your packages, your colleagues (who may be using the install space) will run into all sorts of problems wtih missing files (nothing ends up in the install space without you explicitly install(..)-ing it), etc, etc.


Edit: note though: there is something of a relationship between add_executable(..) and install(..): you cannot install(..) a binary/library that hasn't been created, so you'll need to first use add_executable(..)/add_library(..) before you can install(..) them.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-06-18 03:15:09 -0600

Seen: 1,055 times

Last updated: Jun 18 '18