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

windows: lots of gtest warnings on windows when building shared libs #79

Closed
cyrush opened this issue Aug 30, 2017 · 3 comments
Closed

Comments

@cyrush
Copy link
Member

cyrush commented Aug 30, 2017

Example:
C:\projects\conduit\src\blt\thirdparty_builtin\googletest-release-1.8.0\googletest\include\gtest/internal/gtest-internal.h(589): warning C4251: 'testing::internal::TypedTestCasePState::registered_tests_': class 'std::map<std::string,testing::internal::CodeLocation,std::less<_Kty>,std::allocator<std::pair<const _Kty,_Ty>>>' needs to have dll-interface to be used by clients of class

For more examples, see:
https://ci.appveyor.com/project/cyrush/conduit/build/1.0.643

I believe these didn't happen with gtest 1.7.

Seems like this issue:
google/googletest#860

This PR may provide a fix:
google/googletest#862

(But this PR hasn't been merged into gtest)

@cyrush
Copy link
Member Author

cyrush commented Aug 30, 2017

In the interim, It may be possible to mute these issues by adding extra compiler flags or defines when we use blt_register_library for gtest and gmock when on windows.

@cyrush
Copy link
Member Author

cyrush commented Sep 2, 2017

Adding /wd4251 /wd4251 to the compile flags in blt_reg_lib for gtest and gmock squashes these.

This isn't likely as targeted as the solution in the pr for gtest, but I think its a good temp solution. I'll work on a pr.

@cyrush
Copy link
Member Author

cyrush commented Sep 13, 2017

closing, resolved in PR #83

@cyrush cyrush closed this as completed Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant