Correct gmock/gtest expectations w.r.t. C++11/RTTI
Long story short, some of the tests were failing because they expected either dynamic_cast or RTTI to be functional and it wasn't. Move all common CXXFLAGS out to googletest.test.inc.mk and reference it from googletest.test.mk and .../googletest/Makefile.inc
This commit is contained in:
parent
4783c2dda5
commit
833018816d
@ -1,12 +1,12 @@
|
||||
# $FreeBSD$
|
||||
|
||||
CXXFLAGS+= -DGTEST_HAS_POSIX_RE=1
|
||||
CXXFLAGS+= -DGTEST_HAS_PTHREAD=1
|
||||
CXXFLAGS+= -DGTEST_HAS_STREAM_REDIRECTION=1
|
||||
.include <googletest.test.inc.mk>
|
||||
|
||||
GTEST_DIR= ${SRCTOP}/contrib/googletest
|
||||
GOOGLEMOCK_SRCROOT= ${GTEST_DIR}/googlemock
|
||||
GOOGLETEST_SRCROOT= ${GTEST_DIR}/googletest
|
||||
GOOGLEMOCK_SRCROOT= ${GTEST_DIR}/googlemock
|
||||
GOOGLETEST_SRCROOT= ${GTEST_DIR}/googletest
|
||||
|
||||
CXXFLAGS+= ${GTESTS_FLAGS}
|
||||
|
||||
NO_WTHREAD_SAFETY=
|
||||
|
||||
|
@ -73,6 +73,7 @@ FILESDIR= ${BINDIR}/mk
|
||||
|
||||
.if ${MK_TESTS} != "no"
|
||||
FILES+= atf.test.mk
|
||||
FILES+= googletest.test.inc.mk
|
||||
FILES+= googletest.test.mk
|
||||
FILES+= plain.test.mk
|
||||
FILES+= suite.test.mk
|
||||
|
9
share/mk/googletest.test.inc.mk
Normal file
9
share/mk/googletest.test.inc.mk
Normal file
@ -0,0 +1,9 @@
|
||||
# $FreeBSD$
|
||||
|
||||
GTESTS_CXXFLAGS+= -DGTESTS_HAS_RTTI=1
|
||||
GTESTS_CXXFLAGS+= -DGTESTS_HAS_POSIX_RE=1
|
||||
GTESTS_CXXFLAGS+= -DGTESTS_HAS_PTHREAD=1
|
||||
GTESTS_CXXFLAGS+= -DGTESTS_HAS_STREAM_REDIRECTION=1
|
||||
GTESTS_CXXFLAGS+= -DGTESTS_LANG_CXX11=1
|
||||
GTESTS_CXXFLAGS+= -frtti
|
||||
GTESTS_CXXFLAGS+= -std=c++11
|
@ -27,10 +27,13 @@
|
||||
GTESTS?=
|
||||
|
||||
.if !empty(GTESTS)
|
||||
.include <googletest.test.flags.mk>
|
||||
|
||||
PROGS_CXX+= ${GTESTS}
|
||||
_TESTS+= ${GTESTS}
|
||||
.for _T in ${GTESTS}
|
||||
BINDIR.${_T}= ${TESTSDIR}
|
||||
CXXFLAGS.${_T}+= ${GTESTS_CXXFLAGS}
|
||||
MAN.${_T}?= # empty
|
||||
SRCS.${_T}?= ${_T}.cc
|
||||
TEST_INTERFACE.${_T}= plain
|
||||
|
Loading…
Reference in New Issue
Block a user