From 1f8667c5d949070035390531e4f10c0f945d7352 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 23 May 2016 10:40:20 +0200 Subject: BUILD: Fix test compilation with event recorder enabled --- common/recorderfile.cpp | 4 ++++ common/scummsys.h | 4 ++++ test/module.mk | 1 + 3 files changed, 9 insertions(+) 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) -- cgit v1.2.3