freebsd-src/lib/googletest/gmock/Makefile
Alex Richardson 2ed3236082 Major improvement to build parallelism for googletest internal tests
Currently the googletest internal tests build after the matching library.
However, each of these is serialized at the top level makefile.
Additionally some of the tests (e.g. the gmock-matches-test) take up to
90 seconds to build with clang -O2. Having to wait for this test to
complete before continuing to the next directory seriously slows down the
parllelism of a -j32 build.
Before this change running `make -C lib/googletest -j32 -s` in buildenv
took 202 seconds, now it's 153 due to improved parallelism.

Reviewed By:	emaste (no objection)
Differential Revision: https://reviews.freebsd.org/D26748
2020-10-19 19:50:57 +00:00

46 lines
1.3 KiB
Makefile

# $FreeBSD$
.include <bsd.init.mk>
.PATH: ${GOOGLEMOCK_SRCROOT}/include ${GOOGLEMOCK_SRCROOT}/src
LIB_CXX= gmock
SHLIB_MAJOR= 0
PRIVATELIB= true
CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT}/include
CXXFLAGS+= -I${GOOGLEMOCK_SRCROOT}
CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include
LIBADD+= gtest
LDFLAGS+= -L${.OBJDIR:H}/gtest
INCSGROUPS= MAIN_INCS INTERNAL_INCS INTERNAL_CUSTOM_INCS
MAIN_INCSDIR= ${INCLUDEDIR}${PRIVATELIB:D/private/${LIB}}
MAIN_INCS+= gmock/gmock-matchers.h
MAIN_INCS+= gmock/gmock-more-actions.h
MAIN_INCS+= gmock/gmock-generated-actions.h
MAIN_INCS+= gmock/gmock-generated-matchers.h
MAIN_INCS+= gmock/gmock-generated-nice-strict.h
MAIN_INCS+= gmock/gmock-more-matchers.h
MAIN_INCS+= gmock/gmock-generated-function-mockers.h
MAIN_INCS+= gmock/gmock-cardinalities.h
MAIN_INCS+= gmock/gmock-spec-builders.h
MAIN_INCS+= gmock/gmock.h
MAIN_INCS+= gmock/gmock-actions.h
INTERNAL_INCSDIR= ${MAIN_INCSDIR}/internal
INTERNAL_INCS+= gmock/internal/gmock-port.h
INTERNAL_INCS+= gmock/internal/gmock-internal-utils.h
INTERNAL_INCS+= gmock/internal/gmock-generated-internal-utils.h
INTERNAL_CUSTOM_INCSDIR= ${INTERNAL_INCSDIR}/custom
INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-port.h
INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-matchers.h
INTERNAL_CUSTOM_INCS+= gmock/internal/custom/gmock-generated-actions.h
SRCS+= gmock-all.cc
.include <bsd.lib.mk>