xref: /freebsd/lib/googletest/tests/Makefile.inc (revision c66ec88fed842fbaad62c30d510644ceb7bd2d71)
1# $FreeBSD$
2
3.include "../Makefile.inc"
4# Keep the existing tests directory structure (with subdirs per component)
5# rather than installing all of them to /usr/tests/lib/googletest
6TESTSDIR=	${TESTSBASE}/lib/googletest/${.CURDIR:T}
7
8# Clang's optimizer spends a really long time on these tests at -O2. Changing
9# -O2 to -O1 reduces the -j32 time for lib/googletest/test from 131s to 71s.
10# Using -O0 further reduces the time to 29s, and also reduces the disk usage
11# from 144MB (at -O2) / 92MB (at -O1) to 82MB, so we use -O0.
12# Note: Building without debug info saves about 10-15% of the build time, so we
13# only enable debug info if DEBUG_FLAGS is not empty (71s -> 64s at -O1 and -j32).
14CFLAGS.clang+=	-O0
15.if empty(DEBUG_FLAGS)
16MK_DEBUG_FILES:=no
17CFLAGS.clang+=	-g0
18.endif
19