ros / console_bridge

A ROS-independent package for logging that seamlessly pipes into rosconsole/rosout for ROS-dependent packages.
BSD 3-Clause "New" or "Revised" License
22 stars 62 forks source link

Fix compilation problems with deprecated macros #31

Closed j-rivero closed 8 years ago

j-rivero commented 8 years ago

Workaround for issue #30.

Basically the solution is in commit f3f2d90ba402189257502a68d2da14163fbf56cd: duplicate the log function with a new name, mark it as deprecated and use it in the deprectated macros. I've leaved the deprecation warning on the console_bridge own code so we remember to remove it in the next releases.

I've implemented a basic test which just pretend to compile and helped to simulate downstream code. I've also enable the test in travis.

scpeters commented 8 years ago

Actually that console_bridge_deprecated() statement is making travis fail since it has -Werror set.

j-rivero commented 8 years ago

Actually that console_bridge_deprecated() statement is making travis fail since it has -Werror set.

No problem, removed.

@jspricke can you confirm that the fix works for you?

scpeters commented 8 years ago

+1

waiting for confirmation from @jspricke

jspricke commented 8 years ago

I've tested this patch on top of the console_bridge 0.3-3 currently in Debian unstable and compilation of ros-comm and a few others worked fine.

I'm fine with the patch, except, that I would vote against including gtest in here, but rather depend on it.

scpeters commented 8 years ago

@j-rivero have we ever tried using find_package to find libgtest-dev?

jspricke commented 8 years ago

Hi, any news on this? Regarding gtest, we do it like this in PCL: https://github.com/PointCloudLibrary/pcl/blob/a654fe4188382416c99322cafbd9319c59a7355c/cmake/Modules/FindGtest.cmake.

scpeters commented 8 years ago

How do you find the gtest source on osx? I don't know of a homebrew formula that installs the gtest source

jspricke commented 8 years ago

No idea, I don't use Apple. But I guess you can just put the sources somewhere and point cmake to it.

scpeters commented 8 years ago

I just posted a question on the homebrew mailing list:

scpeters commented 8 years ago

Embedding gtest seems to be the best cross-platform way to use it, so I'm going to merge this as-is.