Page MenuHomeFreeBSD

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

Authored by ngie on Mar 28 2019, 12:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 21, 5:18 AM
Unknown Object (File)
Tue, Nov 19, 3:15 PM
Unknown Object (File)
Tue, Nov 19, 7:26 AM
Unknown Object (File)
Mon, Nov 18, 10:53 PM
Unknown Object (File)
Fri, Nov 8, 8:44 AM
Unknown Object (File)
Tue, Nov 5, 8:21 AM
Unknown Object (File)
Tue, Nov 5, 6:13 AM
Unknown Object (File)
Oct 16 2024, 5:31 PM
Subscribers

Details

Summary

This makes it easier for googletest users to leverage googletest, instead of
having to plug GTEST_CXXFLAGS into CXXFLAGS manually.

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 and ports-provided library
headers.

MFC after: 5 weeks
MFC with: r345203

Test Plan

make buildworld

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This change doesn't work for me. I still need the CXXFLAGS+= ${GTESTS_CXXFLAGS} line in my Makefile.

Nevermind, I patched the wrong file. This change works fine for my test suite, where the supporting files don't need the full GTESTS_CXXFLAGS settings like -DGTEST_HAS_PTHREAD etc.

This revision is now accepted and ready to land.Mar 28 2019, 4:11 AM

Approved, please make reference to the goals of the more proper future fix in the commit message.

Approved, please make reference to the goals of the more proper future fix in the commit message.

Will do!

ngie edited the summary of this revision. (Show Details)
This revision was automatically updated to reflect the committed changes.