在编译yocs_cmd_vel_mux编译的时候出现下面警告:
CMake Warning (dev) at yujin_ocs/yocs_cmd_vel_mux/CMakeLists.txt:30 (add_dependencies):
Policy CMP0046 is not set: Error on non-existent dependency in
add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
The dependency target "geometry_msgs_gencpp" of target
"yocs_cmd_vel_mux_nodelet" does not exist.
This warning is for project developers. Use -Wno-dev to suppress it.
解决办法:
按如下更改,再编译时候就没有那个警告了。
#add_dependencies(${PROJECT_NAME}_nodelet yocs_msgs_gencpp geometry_msgs_gencpp nav_msgs_gencpp)
add_dependencies(${PROJECT_NAME}_nodelet ${catkin_EXPORTED_TARGETS})
参考:
https://blog.csdn.net/SimileciWH/article/details/81484767