Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtest.cmake assumes system library is a shared lib #883

Closed
rctoris opened this issue Aug 15, 2017 · 2 comments
Closed

gtest.cmake assumes system library is a shared lib #883

rctoris opened this issue Aug 15, 2017 · 2 comments

Comments

@rctoris
Copy link
Contributor

rctoris commented Aug 15, 2017

We had a developer computer that had a pre-built version of gtest installed which catkin correctly found. However, it looks like it's assuming the library is a shared library: https://github.com/ros/catkin/blob/kinetic-devel/cmake/test/gtest.cmake#L166-L168

In our case it wasn't and leads to all kinds of wonky linking error messages. We fixed it by remaking gtest as a shared library but it would be nice if it could support either.

@dirk-thomas
Copy link
Member

Can you please clarify on which platform you had that problem and how that system was being setup.

Upstream highly recommends not to use a pre-build library but to build gtest together with your code. Therefore I don't think the maintainers will spend time supporting a static library. If you could provide a pull request for supporting this use case I would be happy to review it.

@dirk-thomas dirk-thomas added this to the untargeted milestone Aug 15, 2017
@rctoris
Copy link
Contributor Author

rctoris commented Aug 15, 2017

This was on Ubuntu 14.04 running indigo. Since catkin currently supports some conditions for this as apposed to no support, I'll look into getting it to check more dynamically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants