2019-02-22 04:52:12 +00:00
|
|
|
GTESTS_CXXFLAGS+= -DGTEST_HAS_POSIX_RE=1
|
|
|
|
GTESTS_CXXFLAGS+= -DGTEST_HAS_PTHREAD=1
|
|
|
|
GTESTS_CXXFLAGS+= -DGTEST_HAS_STREAM_REDIRECTION=1
|
2019-02-20 20:09:59 +00:00
|
|
|
GTESTS_CXXFLAGS+= -frtti
|
2019-02-21 04:47:44 +00:00
|
|
|
|
Work around two -Werror warning issues in googletest, which have been
solved upstream in the mean time.
The first issue is because one of googletest's generated headers contain
classes with a user-declared copy assignment operator, but rely on the
generation by the compiler of an implicit copy constructor, which is now
deprecated:
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/internal/gtest-param-util-generated.h:5284:8: error: definition of implicit copy constructor for 'CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' is deprecated because it has a user-declared copy assignment operator [-Werror,-Wdeprecated-copy]
void operator=(const CartesianProductHolder3& other);
^
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/private/gtest/gtest-param-test.h:1277:10: note: in implicit copy constructor for 'testing::internal::CartesianProductHolder3<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' first required here
return internal::CartesianProductHolder3<Generator1, Generator2, Generator3>(
^
/usr/src/tests/sys/fs/fusefs/io.cc:534:2: note: in instantiation of function template specialization 'testing::Combine<testing::internal::ParamGenerator<bool>, testing::internal::ValueArray3<int, int, int>, testing::internal::ValueArray4<cache_mode, cache_mode, cache_mode, cache_mode> >' requested here
Combine(Bool(), /* async read */
^
For now, silence the warning using -Wno-deprecated-copy.
The second issue is because one of the googlemock test programs attempts
to use "unsigned wchar_t" and "signed wchar_t", which are non-standard
and at best, hazily defined:
contrib/googletest/googlemock/test/gmock-actions_test.cc:111:37: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0U, BuiltInDefaultValue<unsigned wchar_t>::Get());
^
contrib/googletest/googlemock/test/gmock-actions_test.cc:112:36: error: 'wchar_t' cannot be signed or unsigned [-Wsigned-unsigned-wchar]
EXPECT_EQ(0, BuiltInDefaultValue<signed wchar_t>::Get());
^
For now, silence the warning using -Wno-signed-unsigned-wchar.
MFC after: 3 days
2020-01-31 18:26:23 +00:00
|
|
|
.include <bsd.compiler.mk>
|
|
|
|
|
2019-03-28 17:22:31 +00:00
|
|
|
# XXX: src.libnames.mk should handle adding this directory for libgtest's,
|
|
|
|
# libgmock's, etc, headers.
|
|
|
|
CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private
|
2019-02-21 06:49:20 +00:00
|
|
|
|
2023-08-08 06:17:32 +00:00
|
|
|
CXXSTD?= c++14
|
2019-04-22 18:40:46 +00:00
|
|
|
|
2019-02-21 06:49:20 +00:00
|
|
|
NO_WTHREAD_SAFETY=
|