svn commit: r344312 - in projects/import-googletest-1.8.1: lib share/man/man5 share/mk tools/build/options
Enji Cooper
ngie at FreeBSD.org
Tue Feb 19 22:40:34 UTC 2019
Author: ngie
Date: Tue Feb 19 22:40:32 2019
New Revision: 344312
URL: https://svnweb.freebsd.org/changeset/base/344312
Log:
Add MK_GOOGLETEST option for building/installing gmock/gtest
These libraries don't compile on non-C++-11 capable compilers, e.g., g++ 4.2.1
and its corresponding implementation of the c++ library, i.e., libstdc++.
Blacklist compilation on all non-C++-11 capable compilers and give others the
option of opting out of building/installing gmock/gtest via MK_GOOGLETEST.
This option is controlled by MK_CXX and MK_TESTS, as ATF compilation is.
Added:
projects/import-googletest-1.8.1/tools/build/options/WITHOUT_GOOGLETEST (contents, props changed)
Modified:
projects/import-googletest-1.8.1/lib/Makefile
projects/import-googletest-1.8.1/share/man/man5/src.conf.5
projects/import-googletest-1.8.1/share/mk/src.opts.mk
Modified: projects/import-googletest-1.8.1/lib/Makefile
==============================================================================
--- projects/import-googletest-1.8.1/lib/Makefile Tue Feb 19 22:35:14 2019 (r344311)
+++ projects/import-googletest-1.8.1/lib/Makefile Tue Feb 19 22:40:32 2019 (r344312)
@@ -169,6 +169,7 @@ _libcplusplus+= libc++fs
.endif
SUBDIR.${MK_EFI}+= libefivar
+SUBDIR.${MK_GOOGLETEST}+= googletest
SUBDIR.${MK_LIBTHR}+= libthr
SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_eh
SUBDIR.${MK_LLVM_LIBUNWIND}+= libgcc_s
@@ -200,7 +201,6 @@ SUBDIR.${MK_RADIUS_SUPPORT}+= libradius
SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil
SUBDIR.${MK_TELNET}+= libtelnet
SUBDIR.${MK_TESTS_SUPPORT}+= atf
-SUBDIR.${MK_TESTS_SUPPORT}+= googletest
SUBDIR.${MK_TESTS}+= tests
SUBDIR.${MK_UNBOUND}+= libunbound
SUBDIR.${MK_USB}+= libusbhid libusb
Modified: projects/import-googletest-1.8.1/share/man/man5/src.conf.5
==============================================================================
--- projects/import-googletest-1.8.1/share/man/man5/src.conf.5 Tue Feb 19 22:35:14 2019 (r344311)
+++ projects/import-googletest-1.8.1/share/man/man5/src.conf.5 Tue Feb 19 22:40:32 2019 (r344312)
@@ -1,6 +1,6 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
.\" $FreeBSD$
-.Dd February 15, 2019
+.Dd February 19, 2019
.Dt SRC.CONF 5
.Os
.Sh NAME
@@ -529,6 +529,8 @@ When set, it enforces these options:
.It
.Va WITHOUT_GNUCXX
.It
+.Va WITHOUT_GOOGLETEST
+.It
.Va WITHOUT_LLVM_COV
.It
.Va WITHOUT_TESTS
@@ -807,6 +809,11 @@ Set to not build GNU
Set this option to include GNU extensions in
.Xr bsdgrep 1
by linking against libgnuregex.
+.It Va WITHOUT_GOOGLETEST
+Set to not build nor install
+.Lb libgmock ,
+.Lb libgtest ,
+and dependent tests.
.It Va WITHOUT_GPIO
Set to not build
.Xr gpioctl 8
@@ -1784,6 +1791,8 @@ When set, it enforces these options:
.Bl -item -compact
.It
.Va WITHOUT_DTRACE_TESTS
+.It
+.Va WITHOUT_GOOGLETEST
.El
.Pp
When set, these options are also in effect:
Modified: projects/import-googletest-1.8.1/share/mk/src.opts.mk
==============================================================================
--- projects/import-googletest-1.8.1/share/mk/src.opts.mk Tue Feb 19 22:35:14 2019 (r344311)
+++ projects/import-googletest-1.8.1/share/mk/src.opts.mk Tue Feb 19 22:40:32 2019 (r344312)
@@ -108,6 +108,7 @@ __DEFAULT_YES_OPTIONS = \
GDB \
GNU_DIFF \
GNU_GREP \
+ GOOGLETEST \
GPIO \
HAST \
HTML \
@@ -423,6 +424,7 @@ MK_${var}:= no
# Order is somewhat important.
#
.if !${COMPILER_FEATURES:Mc++11}
+MK_GOOGLETEST:= no
MK_LLVM_LIBUNWIND:= no
.endif
@@ -505,6 +507,7 @@ MK_FREEBSD_UPDATE:= no
.if ${MK_TESTS} == "no"
MK_DTRACE_TESTS:= no
+MK_GOOGLETEST:= no
.endif
.if ${MK_ZONEINFO} == "no"
Added: projects/import-googletest-1.8.1/tools/build/options/WITHOUT_GOOGLETEST
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ projects/import-googletest-1.8.1/tools/build/options/WITHOUT_GOOGLETEST Tue Feb 19 22:40:32 2019 (r344312)
@@ -0,0 +1,5 @@
+.\" $FreeBSD$
+Set to not build nor install
+.Lb libgmock ,
+.Lb libgtest ,
+and dependent tests.
More information about the svn-src-projects
mailing list