TEST: Allow building the test runner with MinGW

It needs the same workaround as our dev tools (see bug #1800764)
This commit is contained in:
Littleboy 2011-09-07 19:41:27 -04:00
parent 507b9a75e7
commit 24579ceba9
2 changed files with 12 additions and 1 deletions

11
test/cxxtest_mingw.h Normal file
View File

@ -0,0 +1,11 @@
#ifndef CXXTEST_MINGW
#define CXXTEST_MINGW
// HACK to allow building with the SDL backend on MinGW
// see bug #1800764 "TOOLS: MinGW tools building broken"
#ifdef main
#undef main
#endif // main
#endif // CXXTEST_MINGW

View File

@ -9,7 +9,7 @@ TESTS := $(srcdir)/test/common/*.h $(srcdir)/test/audio/*.h
TEST_LIBS := audio/libaudio.a common/libcommon.a
#
TEST_FLAGS := --runner=StdioPrinter --no-std --no-eh
TEST_FLAGS := --runner=StdioPrinter --no-std --no-eh --include=$(srcdir)/test/cxxtest_mingw.h
TEST_CFLAGS := -I$(srcdir)/test/cxxtest
TEST_LDFLAGS := $(LIBS)
TEST_CXXFLAGS := $(filter-out -Wglobal-constructors,$(CXXFLAGS))