From 2d7e57a400b2cf9cf26607bdb538338a2f5079d6 Mon Sep 17 00:00:00 2001 From: ngie Date: Wed, 20 Feb 2019 00:40:16 +0000 Subject: [PATCH] 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. --- cddl/usr.sbin/zfsd/tests/Makefile | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/cddl/usr.sbin/zfsd/tests/Makefile b/cddl/usr.sbin/zfsd/tests/Makefile index 40cb3ce2f05..2663f3a68a1 100644 --- a/cddl/usr.sbin/zfsd/tests/Makefile +++ b/cddl/usr.sbin/zfsd/tests/Makefile @@ -11,22 +11,6 @@ SRCS= # Use #include 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 -- 2.45.0