aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugene Sandulenko2016-05-23 10:40:20 +0200
committerEugene Sandulenko2016-05-23 16:36:26 +0200
commit1f8667c5d949070035390531e4f10c0f945d7352 (patch)
tree5785f25c24fa319077d394b8e1142f297a7b8641
parenta32c53f936f8b3fbf90d016d3c07de62c96798b1 (diff)
downloadscummvm-rg350-1f8667c5d949070035390531e4f10c0f945d7352.tar.gz
scummvm-rg350-1f8667c5d949070035390531e4f10c0f945d7352.tar.bz2
scummvm-rg350-1f8667c5d949070035390531e4f10c0f945d7352.zip
BUILD: Fix test compilation with event recorder enabled
-rw-r--r--common/recorderfile.cpp4
-rw-r--r--common/scummsys.h4
-rw-r--r--test/module.mk1
3 files changed, 9 insertions, 0 deletions
diff --git a/common/recorderfile.cpp b/common/recorderfile.cpp
index 71f8272b44..04802aa0c8 100644
--- a/common/recorderfile.cpp
+++ b/common/recorderfile.cpp
@@ -30,6 +30,8 @@
#include "graphics/surface.h"
#include "graphics/scaler.h"
+#ifdef ENABLE_EVENTRECORDER
+
#define RECORD_VERSION 1
namespace Common {
@@ -714,3 +716,5 @@ void PlaybackFile::checkRecordedMD5() {
}
+
+#endif // ENABLE_EVENTRECORDER
diff --git a/common/scummsys.h b/common/scummsys.h
index 5e1069fb46..3513ee2d7d 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -215,6 +215,10 @@
#include "config.h"
#endif
+// Now we need to adjust some settings when running tests
+#ifdef COMPILING_TESTS
+#undef ENABLE_EVENTRECORDER
+#endif
// In the following we configure various targets, in particular those
// which can't use our "configure" tool and hence don't use config.h.
diff --git a/test/module.mk b/test/module.mk
index 11ee6bd200..e591854ace 100644
--- a/test/module.mk
+++ b/test/module.mk
@@ -26,6 +26,7 @@ endif
#TEST_LDFLAGS += -L/usr/X11R6/lib -lX11
+test: CXXFLAGS += -DCOMPILING_TESTS=1
test: test/runner
./test/runner
test/runner: test/runner.cpp $(TEST_LIBS)