1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

Spam CXXFLAGS with -I${DESTDIR}/usr/include/private, instead of GTEST_CXXFLAGS

This makes it easier for googletest users to leverage googletest, instead of
forcing them to plug GTEST_CXXFLAGS into CXXFLAGS manually (resulting in
unnecessary duplication).

I will be following this up with a more proper fix in src.libnames.mk, as
src.libnames.mk should be automatically adding this directory to
CFLAGS/CXXFLAGS when private libraries are referenced. Not doing so can result
in mismatches between base-provided private library's and ports-provided
library's headers.

While here, tweak the comment to clarify what the intent is behind spamming
CXXFLAGS.

MFC after:	5 weeks
MFC with:	r345203
Reported by:	asomers
Reviewed by:	asomers
Approved by:	emaste (mentor)
Differential Revision: https://reviews.freebsd.org/D19731
This commit is contained in:
Enji Cooper 2019-03-28 17:22:31 +00:00
parent 7d757b71bf
commit fb72cf61ac
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345645

View File

@ -9,7 +9,8 @@ GTESTS_CXXFLAGS+= -DGTEST_HAS_STREAM_REDIRECTION=1
GTESTS_CXXFLAGS+= -frtti
GTESTS_CXXFLAGS+= -std=${CXXSTD}
# XXX: src.libnames.mk should handle adding this directory.
GTESTS_CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private
# XXX: src.libnames.mk should handle adding this directory for libgtest's,
# libgmock's, etc, headers.
CXXFLAGS+= -I${DESTDIR}${INCLUDEDIR}/private
NO_WTHREAD_SAFETY=