How do I test the ROS version in C++ code?
I maintain a package that needs to support both cturtle
and diamondback
, at least for a while. It includes <roslib/Clock.h>
, which is deprecated in diamondback
. That generates a compiler warning. I prefer to reserve compiler warnings for actual bugs in my code.
How can I #ifdef
this code so it includes <roslib/Clock.h>
in cturtle
, but uses <rosgraph_msgs/Clock.h>
for diamondback
?