svn commit: r344326 - projects/import-googletest-1.8.1/cddl/usr.sbin/zfsd/tests

Enji Cooper ngie at FreeBSD.org
Wed Feb 20 00:40:17 UTC 2019


Author: ngie
Date: Wed Feb 20 00:40:16 2019
New Revision: 344326
URL: https://svnweb.freebsd.org/changeset/base/344326

Log:
  Rely on gmock/gtest integration done in branch
  
  The previous logic made a number of assumptions which were required
  pre-buildworld integration of gmock/gtest, including looking for
  gmock/gtest out of tree.
  
  Remove the code now that the assumptions are no longer required,
  leveraging `LIBADD` instead.

Modified:
  projects/import-googletest-1.8.1/cddl/usr.sbin/zfsd/tests/Makefile

Modified: projects/import-googletest-1.8.1/cddl/usr.sbin/zfsd/tests/Makefile
==============================================================================
--- projects/import-googletest-1.8.1/cddl/usr.sbin/zfsd/tests/Makefile	Wed Feb 20 00:25:45 2019	(r344325)
+++ projects/import-googletest-1.8.1/cddl/usr.sbin/zfsd/tests/Makefile	Wed Feb 20 00:40:16 2019	(r344326)
@@ -11,22 +11,6 @@ SRCS=
 # Use #include <zfsd/xxx.h> in test programs.
 INCFLAGS+=	-I${.CURDIR:H:H}
 
-.if defined(DESTDIR) || defined(SYSROOT)
-INCFLAGS+=		-I${SYSROOT:U${DESTDIR}}/usr/include
-LDFLAGS.zfsd_unittest+=	-L${SYSROOT:U${DESTDIR}}/lib \
-			-L${SYSROOT:U${DESTDIR}}/usr/lib
-.endif
-
-# Googletest options
-INCFLAGS+=	-I${LOCALBASE}/include -D_THREAD_SAFE -pthread
-LDFLAGS.zfsd_unittest+=	-L${LOCALBASE}/lib -D_THREAD_SAFE -pthread
-LDADD.zfsd_unittest+=		${LOCALBASE}/lib/libgtest.a
-
-# GoogleMock options
-LDADD.zfsd_unittest+= ${LOCALBASE}/lib/libgmock.a ${LOCALBASE}/lib/libgmock_main.a
-
-# Googlemock fails if we don't have this line
-# https://groups.google.com/forum/#!msg/googletestframework/h8ixEPCFm0o/amwfu4xGJb0J
-CFLAGS.zfsd_unittest+= -DGTEST_HAS_PTHREAD
+LIBDADD.zfsd_unittest+=	gmock_main
 
 .include <bsd.test.mk>


More information about the svn-src-projects mailing list