xref: /freebsd/lib/googletest/tests/gtest/Makefile (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
12ed32360SAlex Richardson.include <bsd.init.mk>
22ed32360SAlex Richardson
32ed32360SAlex Richardson.PATH:	${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test
42ed32360SAlex Richardson
52ed32360SAlex RichardsonGTESTS+=	gtest_environment_test
62ed32360SAlex RichardsonGTESTS+=	gtest_no_test_unittest
72ed32360SAlex RichardsonGTESTS+=	googletest-param-test-test
82ed32360SAlex RichardsonGTESTS+=	gtest_premature_exit_test
92ed32360SAlex RichardsonGTESTS+=	gtest_repeat_test
102ed32360SAlex RichardsonGTESTS+=	gtest_stress_test
112ed32360SAlex RichardsonGTESTS+=	gtest_throw_on_failure_ex_test
122ed32360SAlex RichardsonGTESTS+=	gtest-unittest-api_test
132ed32360SAlex Richardson
142ed32360SAlex RichardsonCXXFLAGS+=	-I${GOOGLETEST_SRCROOT}/include
152ed32360SAlex RichardsonCXXFLAGS+=	-I${GOOGLETEST_SRCROOT}
162ed32360SAlex Richardson
172ed32360SAlex Richardson.for death_test in gtest-death-test_ex_catch_test gtest-death-test_ex_nocatch_test
182ed32360SAlex Richardson# XXX: copying source files in order to tweak CXXFLAGS seems hacky.
192ed32360SAlex Richardson${death_test}.cc: googletest-death-test_ex_test.cc
202ed32360SAlex Richardson	${CP} ${.ALLSRC} ${.TARGET}
212ed32360SAlex RichardsonCLEANFILES+=	${death_test}.cc
222ed32360SAlex RichardsonCXXFLAGS.${death_test}+= -fexception
232ed32360SAlex Richardson.endfor
242ed32360SAlex Richardson
252ed32360SAlex RichardsonCXXFLAGS.gtest-death-test_ex_catch_test+=	\
262ed32360SAlex Richardson	-DGTEST_ENABLE_CATCH_EXCEPTIONS_=1
272ed32360SAlex Richardson
282ed32360SAlex RichardsonCXXFLAGS.gtest-death-test_ex_nocatch_test+=     \
292ed32360SAlex Richardson	-DGTEST_ENABLE_CATCH_EXCEPTIONS_=0
302ed32360SAlex Richardson
312ed32360SAlex RichardsonSRCS.googletest-param-test-test=       \
322ed32360SAlex Richardson	googletest-param-test-test.cc   \
332ed32360SAlex Richardson	googletest-param-test2-test.cc
342ed32360SAlex Richardson
352ed32360SAlex RichardsonLIBADD+=	gtest
362ed32360SAlex Richardson
3728f6c2f2SEnji CooperCXXFLAGS.clang+=	-Wno-error=missing-variable-declarations
38*0c785f06SEnji CooperMK_WERROR.gcc=		no
3928f6c2f2SEnji Cooper
402ed32360SAlex Richardson# XXX: explicitly listing -lpthread is incorrect. src.libnames.mk should be
412ed32360SAlex Richardson#      handling this.
422ed32360SAlex RichardsonLIBADD.gtest_stress_test+=     pthread
432ed32360SAlex Richardson
442ed32360SAlex Richardson.include <bsd.test.mk>
45