diff --git a/Externals/gtest/cmake/internal_utils.cmake b/Externals/gtest/cmake/internal_utils.cmake index 8878dc1a9592..6184bb26b6c3 100644 --- a/Externals/gtest/cmake/internal_utils.cmake +++ b/Externals/gtest/cmake/internal_utils.cmake @@ -81,8 +81,6 @@ macro(config_compiler_and_linker) # Suppress "unreachable code" warning on VS 2012 and later. # http://stackoverflow.com/questions/3232669 explains the issue. set(cxx_base_flags "${cxx_base_flags} -wd4702") - endif() - if (NOT (MSVC_VERSION GREATER 1900)) # 1900 is Visual Studio 2015 # BigObj required for tests. set(cxx_base_flags "${cxx_base_flags} -bigobj") endif() diff --git a/Externals/gtest/include/gtest/internal/gtest-port.h b/Externals/gtest/include/gtest/internal/gtest-port.h index 0d53ad27a79b..fc7989053dd8 100644 --- a/Externals/gtest/include/gtest/internal/gtest-port.h +++ b/Externals/gtest/include/gtest/internal/gtest-port.h @@ -323,7 +323,7 @@ // -std={c,gnu}++{0x,11} is passed. The C++11 standard specifies a // value for __cplusplus, and recent versions of clang, gcc, and // probably other compilers set that too in C++11 mode. -# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L +# if __GXX_EXPERIMENTAL_CXX0X__ || __cplusplus >= 201103L || _MSC_VER >= 1900 // Compiling in at least C++11 mode. # define GTEST_LANG_CXX11 1 # else @@ -355,12 +355,16 @@ #if GTEST_STDLIB_CXX11 # define GTEST_HAS_STD_BEGIN_AND_END_ 1 # define GTEST_HAS_STD_FORWARD_LIST_ 1 -# define GTEST_HAS_STD_FUNCTION_ 1 +# if !defined(_MSC_VER) || (_MSC_FULL_VER >= 190023824) // works only with VS2015U2 and better +# define GTEST_HAS_STD_FUNCTION_ 1 +# endif # define GTEST_HAS_STD_INITIALIZER_LIST_ 1 # define GTEST_HAS_STD_MOVE_ 1 # define GTEST_HAS_STD_SHARED_PTR_ 1 # define GTEST_HAS_STD_TYPE_TRAITS_ 1 # define GTEST_HAS_STD_UNIQUE_PTR_ 1 +# define GTEST_HAS_UNORDERED_MAP_ 1 +# define GTEST_HAS_UNORDERED_SET_ 1 #endif // C++11 specifies that provides std::tuple.