aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLittleboy2011-09-07 19:41:27 -0400
committerLittleboy2011-09-07 19:41:27 -0400
commit24579ceba9b219ab3a89f31b5496b2633e076af6 (patch)
treed4a3eb5131a0b4416dfdee30ad30fc8cb52bc883 /test
parent507b9a75e729eb50f2ef63d2234c3c1b434f2ee1 (diff)
downloadscummvm-rg350-24579ceba9b219ab3a89f31b5496b2633e076af6.tar.gz
scummvm-rg350-24579ceba9b219ab3a89f31b5496b2633e076af6.tar.bz2
scummvm-rg350-24579ceba9b219ab3a89f31b5496b2633e076af6.zip
TEST: Allow building the test runner with MinGW
It needs the same workaround as our dev tools (see bug #1800764)
Diffstat (limited to 'test')
-rw-r--r--test/cxxtest_mingw.h11
-rw-r--r--test/module.mk2
2 files changed, 12 insertions, 1 deletions
diff --git a/test/cxxtest_mingw.h b/test/cxxtest_mingw.h
new file mode 100644
index 0000000000..f407105bfe
--- /dev/null
+++ b/test/cxxtest_mingw.h
@@ -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 \ No newline at end of file
diff --git a/test/module.mk b/test/module.mk
index 4e5cbf62e1..11ee6bd200 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -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))