Build death tests programmatically
The previous code hardcoded the death test build definitions in a duplicative manner. The new code doesn't.
This commit is contained in:
parent
900e7b9404
commit
7481b4234c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/projects/import-googletest-1.8.1/; revision=344416
@ -4,8 +4,6 @@
|
||||
|
||||
.PATH: ${GOOGLETEST_SRCROOT}/src ${GOOGLETEST_SRCROOT}/test
|
||||
|
||||
GTESTS+= gtest-death-test_ex_catch_test
|
||||
GTESTS+= gtest-death-test_ex_nocatch_test
|
||||
GTESTS+= gtest_environment_test
|
||||
GTESTS+= gtest_no_test_unittest
|
||||
GTESTS+= googletest-param-test-test
|
||||
@ -18,16 +16,19 @@ GTESTS+= gtest-unittest-api_test
|
||||
CXXFLAGS+= -I${GOOGLETEST_SRCROOT}/include
|
||||
CXXFLAGS+= -I${GOOGLETEST_SRCROOT}
|
||||
|
||||
gtest-death-test_ex_catch_test.cc gtest-death-test_ex_nocatch_test.cc: googletest-death-test_ex_test.cc
|
||||
.for death_test in gtest-death-test_ex_catch_test gtest-death-test_ex_nocatch_test
|
||||
# XXX: copying source files in order to tweak CXXFLAGS seems hacky.
|
||||
${death_test}.cc: googletest-death-test_ex_test.cc
|
||||
${CP} ${.ALLSRC} ${.TARGET}
|
||||
CLEANFILES+= ${death_test}.cc
|
||||
CXXFLAGS.${death_test}+= -fexception
|
||||
.endfor
|
||||
|
||||
CXXFLAGS.gtest-death-test_ex_catch_test+= \
|
||||
-DGTEST_ENABLE_CATCH_EXCEPTIONS_=1 \
|
||||
-fexceptions
|
||||
CXXFLAGS.gtest-death-test_ex_catch_test+= \
|
||||
-DGTEST_ENABLE_CATCH_EXCEPTIONS_=1
|
||||
|
||||
CXXFLAGS.gtest-death-test_ex_nocatch_test+= \
|
||||
-DGTEST_ENABLE_CATCH_EXCEPTIONS_=0 \
|
||||
-fexceptions
|
||||
-DGTEST_ENABLE_CATCH_EXCEPTIONS_=0
|
||||
|
||||
SRCS.googletest-param-test-test= \
|
||||
googletest-param-test-test.cc \
|
||||
|
Loading…
Reference in New Issue
Block a user