2019-02-20 20:09:59 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
Initial googlemock/googletest integration into the build/FreeBSD test suite
This initial integration takes googlemock/googletest release 1.8.1, integrates
the library, tests, and sample unit tests into the build.
googlemock/googletest's inclusion is optionally available via `MK_GOOGLETEST`.
`MK_GOOGLETEST` is dependent on `MK_TESTS` and is enabled by default when
built with a C++11 capable toolchain.
Google tests can be specified via the `GTESTS` variable, which, in comparison
with the other test drivers, is more simplified/streamlined, as Googletest only
supports C++ tests; not raw C or shell tests (C tests can be written in C++
using the standard embedding methods).
No dependent libraries are assumed for the tests. One must specify `gmock`,
`gmock_main`, `gtest`, or `gtest_main`, via `LIBADD` for the program.
More information about googlemock and googletest can be found on the
Googletest [project page](https://github.com/google/googletest), and the
[GoogleMock](https://github.com/google/googletest/blob/v1.8.x/googlemock/docs/Documentation.md)
and
[GoogleTest](https://github.com/google/googletest/tree/v1.8.x/googletest/docs)
docs.
These tests are originally integrated into the build as plain driver tests, but
will be natively integrated into Kyua in a later version.
Known issues/Errata:
* [WhenDynamicCastToTest.AmbiguousCast fails on FreeBSD](https://github.com/google/googletest/issues/2172)
Reviewed by: asomers
Approved by: emaste (mentor)
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D19551
2019-03-15 21:43:52 +00:00
|
|
|
# XXX: this should be defined in bsd.sys.mk
|
|
|
|
CXXSTD?= c++11
|
|
|
|
|
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
|
Initial googlemock/googletest integration into the build/FreeBSD test suite
This initial integration takes googlemock/googletest release 1.8.1, integrates
the library, tests, and sample unit tests into the build.
googlemock/googletest's inclusion is optionally available via `MK_GOOGLETEST`.
`MK_GOOGLETEST` is dependent on `MK_TESTS` and is enabled by default when
built with a C++11 capable toolchain.
Google tests can be specified via the `GTESTS` variable, which, in comparison
with the other test drivers, is more simplified/streamlined, as Googletest only
supports C++ tests; not raw C or shell tests (C tests can be written in C++
using the standard embedding methods).
No dependent libraries are assumed for the tests. One must specify `gmock`,
`gmock_main`, `gtest`, or `gtest_main`, via `LIBADD` for the program.
More information about googlemock and googletest can be found on the
Googletest [project page](https://github.com/google/googletest), and the
[GoogleMock](https://github.com/google/googletest/blob/v1.8.x/googlemock/docs/Documentation.md)
and
[GoogleTest](https://github.com/google/googletest/tree/v1.8.x/googletest/docs)
docs.
These tests are originally integrated into the build as plain driver tests, but
will be natively integrated into Kyua in a later version.
Known issues/Errata:
* [WhenDynamicCastToTest.AmbiguousCast fails on FreeBSD](https://github.com/google/googletest/issues/2172)
Reviewed by: asomers
Approved by: emaste (mentor)
MFC after: 2 months
Differential Revision: https://reviews.freebsd.org/D19551
2019-03-15 21:43:52 +00:00
|
|
|
GTESTS_CXXFLAGS+= -std=${CXXSTD}
|
2019-02-21 04:47:44 +00:00
|
|
|
|
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
|
|
|
|
|
|
|
NO_WTHREAD_SAFETY=
|