Skip to content

Commit

Permalink
Disable std::tr1 deprecation warning in MSVC for googletest. (#93)
Browse files Browse the repository at this point in the history
Visual Studio 17, tools update 2 (15.5) makes the use of std::tr1
deprecated and an error at /W3.  This ignores that error and should
be removed once googletest fixes this upstream.

see: google/googletest#1111
  • Loading branch information
almann authored and tgregg committed Jan 5, 2018
1 parent 0209845 commit 564a140
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ if (MSVC)
# Prevent googletest from linking against different versions of the C Runtime Library on
# Windows.
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
# Prevent deprecation errors for std::tr1 in googletest
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING")
else()
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -O0 -Wall")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -O0 -Wall")
Expand Down

0 comments on commit 564a140

Please sign in to comment.