编译cmd_vel_mux时候给出警告如下:
CMake Warning (dev) at yujin_ocs/yocs_cmd_vel_mux/CMakeLists.txt:31 (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.
解决办法:
在 CMakeLists.txt 文件中加入下面一行:
cmake_policy(SET CMP0046 OLD)
参考:
https://answers.ros.org/question/222139/how-to-disable-policy-cmp0045-is-not-set-warnings/