mirror of https://github.com/google/googletest.git
Fix strict Cygwin POSIX declarations
This commit is contained in:
parent
efbef50b59
commit
e883cb7717
|
|
@ -205,6 +205,10 @@ if (gtest_build_tests)
|
|||
cxx_test(googletest-param-test-test gtest
|
||||
test/googletest-param-test2-test.cc)
|
||||
cxx_test(googletest-port-test gtest_main)
|
||||
if (CYGWIN)
|
||||
cxx_test(gtest_cygwin_strict_test gtest_main)
|
||||
set_property(TARGET gtest_cygwin_strict_test PROPERTY CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
cxx_test(gtest_pred_impl_unittest gtest_main)
|
||||
cxx_test(gtest_premature_exit_test gtest
|
||||
test/gtest_premature_exit_test.cc)
|
||||
|
|
|
|||
|
|
@ -272,6 +272,10 @@
|
|||
// GCC15 warns that <ciso646> is deprecated in C++17 and suggests using
|
||||
// <version> instead, even though <version> is not available in C++17 mode prior
|
||||
// to GCC9.
|
||||
#if defined(__CYGWIN__) && defined(__STRICT_ANSI__) && !defined(_POSIX_C_SOURCE)
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
|
||||
#if GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L || \
|
||||
GTEST_INTERNAL_HAS_INCLUDE(<version>)
|
||||
#include <version> // C++20 or <version> support.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
#include "gtest/gtest.h"
|
||||
|
||||
TEST(CygwinStrictStandardTest, PortHeaderCompiles) { SUCCEED(); }
|
||||
Loading…
Reference in New Issue