Merge 658aaf7003f0349b89535a5f5e8a3e182b0340c2 into e588eb1ff9ff6598666279b737b27f983156ad85
This commit is contained in:
commit
f81921cac0
@ -13,6 +13,10 @@ set(GOOGLETEST_VERSION 1.10.0)
|
|||||||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.1")
|
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.1")
|
||||||
if(NOT CYGWIN AND NOT MSYS)
|
if(NOT CYGWIN AND NOT MSYS)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
|
if(APPLE)
|
||||||
|
set(CMAKE_CXX_STANDARD 11)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -2235,7 +2235,7 @@ using StringView = ::absl::string_view;
|
|||||||
} // namespace testing
|
} // namespace testing
|
||||||
#else
|
#else
|
||||||
#ifdef __has_include
|
#ifdef __has_include
|
||||||
# if __has_include(<string_view>) && __cplusplus >= 201703L
|
#if __has_include(<string_view>) && __cplusplus > 201402L
|
||||||
// Otherwise for C++17 and higher use std::string_view for Matcher<>
|
// Otherwise for C++17 and higher use std::string_view for Matcher<>
|
||||||
// specializations.
|
// specializations.
|
||||||
# define GTEST_INTERNAL_HAS_STRING_VIEW 1
|
# define GTEST_INTERNAL_HAS_STRING_VIEW 1
|
||||||
@ -2247,7 +2247,24 @@ using StringView = ::std::string_view;
|
|||||||
} // namespace testing
|
} // namespace testing
|
||||||
// The case where absl is configured NOT to alias std::string_view is not
|
// The case where absl is configured NOT to alias std::string_view is not
|
||||||
// supported.
|
// supported.
|
||||||
# endif // __has_include(<string_view>) && __cplusplus >= 201703L
|
# endif // __has_include(<string_view>) && __cplusplus > 201402L
|
||||||
|
#else
|
||||||
|
// well, what if __has_include is not supported by the compiler ? that may be the case with older msvc ?
|
||||||
|
// it might not make sense to actually check for that, since string_view is available from c++17
|
||||||
|
// but uh, let me fix msvc tests for now
|
||||||
|
#if __cplusplus > 201402L
|
||||||
|
// Otherwise for C++17 and higher use std::string_view for Matcher<>
|
||||||
|
// specializations.
|
||||||
|
# define GTEST_INTERNAL_HAS_STRING_VIEW 1
|
||||||
|
#include <string_view>
|
||||||
|
namespace testing {
|
||||||
|
namespace internal {
|
||||||
|
using StringView = ::std::string_view;
|
||||||
|
} // namespace internal
|
||||||
|
} // namespace testing
|
||||||
|
// The case where absl is configured NOT to alias std::string_view is not
|
||||||
|
// supported.
|
||||||
|
#endif
|
||||||
# endif // __has_include
|
# endif // __has_include
|
||||||
#endif // GTEST_HAS_ABSL
|
#endif // GTEST_HAS_ABSL
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user