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 cannot be compiled with VS 2017 update 2 #341

Closed
bernhardmgruber opened this issue Jan 8, 2018 · 0 comments · Fixed by #342
Closed

gtest cannot be compiled with VS 2017 update 2 #341

bernhardmgruber opened this issue Jan 8, 2018 · 0 comments · Fixed by #342

Comments

@bernhardmgruber
Copy link
Collaborator

Visual Studio 2017 update 2 (15.5) emits deprecation warnings for each use of things in std::tr1. Unfortunately, gtest treats those warnings as errors.

This issue is currently on the way to be fixed:
google/googletest#1111

In the meanwhile, the following workaround for cmake based projects is advised (read the notes at the end of the gtest issue):

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
endif()

This supresses the deprecation warnings.

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

Successfully merging a pull request may close this issue.

1 participant