Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 20 Feb 2019 00:19:11 +0000 (UTC)
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r344324 - in projects/import-googletest-1.8.1/lib/googletest: gmock_main gtest_main
Message-ID:  <201902200019.x1K0JBJ8001654@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ngie
Date: Wed Feb 20 00:19:11 2019
New Revision: 344324
URL: https://svnweb.freebsd.org/changeset/base/344324

Log:
  Fix up dependency finding for libg{mock,test}_main
  
  - Look up the corresponding non-*_main libraries via LDFLAGS using the
    directories provided in src.libnames.mk. This will allow the libraries to
    be built in the "make libraries" phase of buildworld.
  - gtest_main relies on gtest, but didn't explicitly call out the dependency
    in `LIBADD`. Fill in this missing blank.

Modified:
  projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile
  projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile

Modified: projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile
==============================================================================
--- projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile	Wed Feb 20 00:15:25 2019	(r344323)
+++ projects/import-googletest-1.8.1/lib/googletest/gmock_main/Makefile	Wed Feb 20 00:19:11 2019	(r344324)
@@ -12,7 +12,11 @@ CXXFLAGS+=	-I${GOOGLEMOCK_SRCROOT}/include
 CXXFLAGS+=	-I${GOOGLEMOCK_SRCROOT}
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
 
-LIBADD=		gmock
+LIBADD+=	gmock
+# NB: LDFLAGS added for buildworld builds
+LDFLAGS+=	-L${LIBGTESTDIR}
+LDFLAGS+=	-L${LIBGMOCKDIR}
+
 SRCS+=		gmock_main.cc
 
 SUBDIR.${MK_TESTS}+=	tests

Modified: projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile
==============================================================================
--- projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile	Wed Feb 20 00:15:25 2019	(r344323)
+++ projects/import-googletest-1.8.1/lib/googletest/gtest_main/Makefile	Wed Feb 20 00:19:11 2019	(r344324)
@@ -11,6 +11,10 @@ PRIVATELIB=	true
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
 CXXFLAGS+=	-I${GOOGLETEST_SRCROOT}
 
+LIBADD+=	gtest
+# NB: LDFLAGS added for buildworld builds
+LDFLAGS+=	-L${LIBGTESTDIR}
+
 SRCS+=		gtest_main.cc
 
 SUBDIR.${MK_TESTS}+=	tests



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902200019.x1K0JBJ8001654>