Force #define GTEST_LANG_CXX11.
authorZachary Turner <zturner@google.com>
Fri, 27 Oct 2017 21:12:28 +0000 (21:12 +0000)
committerZachary Turner <zturner@google.com>
Fri, 27 Oct 2017 21:12:28 +0000 (21:12 +0000)
commit94f5032aedbd49e2f828e2bb31c006332c2bcaa7
tree3f371f35dd0b90cc8654779aba139d995f54adcd
parentd69453290ebeb65dd7d5411166aba0b1443d53f2
Force #define GTEST_LANG_CXX11.

gtest depends on this #define to determine whether it can
use various classes like std::tuple, or whether it has to fall
back to experimental classes in the std::tr1 namespace.  The
check in the current version of gtest relies on the value of
the `__cplusplus` macro, but MSVC provides a non-conformant
value of this macro, making it effectively impossible to detect
C++11.  In short, LLVM compiled with MSVC has been silently
using the tr1 versions of several classes since the beginning of
time.

This would normally be pretty benign, except that in the latest
preview of MSVC they have marked all of the tr1 classes
deprecated, so it spews thousands of warnings.

llvm-svn: 316798
llvm/cmake/modules/AddLLVM.cmake
llvm/lib/Testing/Support/CMakeLists.txt
llvm/utils/unittest/CMakeLists.txt