OSDN Git Service

VS2017 - 15.5.0 kludge for GTest UnitTests
authorGreyMerlin <GreyMerlin7@gmail.com>
Thu, 7 Dec 2017 01:25:38 +0000 (17:25 -0800)
committerGreyMerlin <GreyMerlin7@gmail.com>
Thu, 7 Dec 2017 01:53:09 +0000 (17:53 -0800)
commit4935eab30ff37e15a2dd3e5a09773546b66af948
treef5afe98cd4e7c5474f48068de3729b76cef28d4b
parent688dfdae97d9fcbe52580f411f8e954c38637cd4
VS2017 - 15.5.0 kludge for GTest UnitTests

 * Using the latest (and just released) version 15.5.0 of VS2017
introduces the following error into the UnitTests project ...

"error C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1
namespace and TR1-only machinery are deprecated and will be REMOVED.
You can define _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING to
acknowledge that you have received this warning. "

* MSDN claims that this is a C++17 language standards issue, but I was
not able to solve this problem by specifying the use of the C++14
standard language (the Properties control for this is likewise a new
feature of version 15.5.0) See...
https://docs.microsoft.com/en-us/cpp/cpp-conformance-improvements-2017

* The only simple, short-term solution that I could come up with was to
simply follow the suggestion of defining the _SILENCE_TR1_xxx token as
given above.

* Even though this problem has been discussed in the GoogleTest github
forum since at least 6 June, the underlying problem remains un-resolved
at this hour ...
See https://github.com/google/googletest/issues/1111
See https://github.com/google/googletest/issues/1320
See https://github.com/google/googletest/pull/1311

* I will assume that Google's resolution of this problem will require
WinMerge to adopt the newest GoogleTest framework (which is likely a
good idea anyway).  I will keep an eye on their progress and resolution
and advise accordingly.  In the meantime, this kludge allows WinMerge's
UnitTests project to compile and execute correctly.
Testing/GoogleTest/UnitTests/UnitTests.vs2017.vcxproj