64,654
社区成员
发帖
与我相关
我的任务
分享
TARGET: "$(OutDir)\runner.cpp"
# Where to look for the tests
TESTS = ..\tests\*.h
# Where the CxxTest distribution is unpacked
CXXTESTDIR = ..\..\..\..\ProjTools\CxxTest
# Check CXXTESTDIR
!if !exist($(CXXTESTDIR)\cxxtestgen.pl)
CXXTESTDIR = ..\..\..\ProjTools\CxxTest
!if !exist($(CXXTESTDIR)\cxxtestgen.pl)
CXXTESTDIR = ..\..\ProjTools\CxxTest
!elseif !exist($(CXXTESTDIR)\cxxtestgen.pl)
!error You must define CXXTESTDIR
!endif
!endif
# cxxtestgen needs Perl or Python
!if defined(PERL)
CXXTESTGEN = $(PERL) "$(CXXTESTDIR)/cxxtestgen.pl"
!elseif defined(PYTHON)
CXXTESTGEN = $(PYTHON) "$(CXXTESTDIR)/cxxtestgen.py"
!else
!error You must define PERL or PYTHON
!endif
# Select the Print formatter, if not already defined
!if !defined(PRINTER)
!if defined(CI_BUILD)
PRINTER = XmlPrinter
!else
PRINTER = PrintfPrinter
!endif
!endif
# The arguments to pass to cxxtestgen
CXXTESTGEN_FLAGS = \
--runner=$(PRINTER) \
--no-eh \
--no-static-init \
--include=Platform.h
# How to generate the test runner, `runner.cpp'
"$(OutDir)\runner.cpp": $(TESTS)
$(CXXTESTGEN) $(CXXTESTGEN_FLAGS) $(TESTS) >"$(OutDir)\runner.cpp"