Cmake error add_executable
Hi guys. I did catkin_make again and I got 3 of the same error. That is:
CMake Error at /opt/ros/groovy/share/dynamic_reconfigure/cmake/extras.cmake:58 (add_custom_target):
add_custom_target cannot create target "pcl_ros_gencfg" because another
target with the same name already exists. The existing target is a custom
target created in source directory "/home/gordon/catkin_ws/src/flight".
See documentation for policy CMP0002 for more details.
CMake Error at navigation/voxel_grid/CMakeLists.txt:28 (add_executable):
add_executable cannot create target "voxel_grid" because another target
with the same name already exists. The existing target is a shared library
created in source directory
"/home/gordon/catkin_ws/src/navigation/voxel_grid". See documentation for
policy CMP0002 for more details.
CMake Error at hector_slam/hector_geotiff_plugins/CMakeLists.txt:75 (add_executable):
add_executable cannot create target "hector_geotiff_plugins" because
another target with the same name already exists. The existing target is a
shared library created in source directory
"/home/gordon/catkin_ws/src/hector_slam/hector_geotiff_plugins". See
documentation for policy CMP0002 for more details.
I know of one solution that is to use catkinmakeisolated to prevent these from happening but I was told that it will make the whole thing work slower.
Anybody solved this before?
Asked by psprox96 on 2015-06-30 04:19:48 UTC
Comments
Again? Same error? If this is a continuation of a previous post, this should be in that post, or at least link it.
Asked by Javier V. Gómez on 2015-07-01 01:52:37 UTC
Hi there! I tried to catkin_make after putting a new package and got these errors. Just a moment ago, I compared their respective CMakeLists.txt with the original ones and found out that there are changes made to the add_executable line. Replacing them with the default ones corrected the problems.
Asked by psprox96 on 2015-07-01 04:46:50 UTC
I'm happy you made it work. So you can close the question, write your own answer and accept it or remove it.
Asked by Javier V. Gómez on 2015-07-01 05:04:09 UTC