rosbook / effective_robotics_programming_with_ros

Effective Robotics Programming with ROS
https://www.packtpub.com/hardware-and-creative/effective-robotics-programming-ros-third-edition
233 stars 154 forks source link

another target with the same name already exists #1

Closed sensiki closed 7 years ago

sensiki commented 7 years ago

at effective_robotics_programming_with_ros/chapter3_tutorials/CMakeLists.txt:57 (add_executable): add_executable cannot create target "example4" because another target with the same name already exists. The existing target is an executable created in source directory "/home/sensiki/dev/catkin_ws/src/effective_robotics_programming_with_ros/chapter2_tutorials". See documentation for policy CMP0002 for more details.

Anilm3 commented 7 years ago

The targets have the same name in both chapter2 and chapter3, before we fix it you can try changing the target names in the CMakeLists.txt of one of them to be able to continue.

efernandez commented 7 years ago

@sensiki Are you building with:

  1. catkin_make, or
  2. catkin build

?

efernandez commented 7 years ago

I've just tried again, and with catkin build there's no problem.

@sensiki clean your workspace (rm -rf build devel) and use catkin build. That way you won't have this problem.

efernandez commented 7 years ago

I'm going to update the README though, as it says that both flavours should work.

efernandez commented 7 years ago

Done.

Also created kinetic and lunar branches, which for now simply point to master.

Thanks @sensiki