From a4051422b4364d1193abc9a31d1f3df42fdedc47 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 10 Jun 2017 13:22:55 +1000 Subject: Avoid warnings when compiling unit tests with recent GCC. --- test/unit/unitTest.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test') diff --git a/test/unit/unitTest.cxx b/test/unit/unitTest.cxx index a6feed204..eb554abc2 100644 --- a/test/unit/unitTest.cxx +++ b/test/unit/unitTest.cxx @@ -38,6 +38,14 @@ #include "Platform.h" +#if defined(__GNUC__) +// Want to avoid misleading indentation warnings in catch.hpp but the pragma +// may not be available so protect by turning off pragma warnings +#pragma GCC diagnostic ignored "-Wunknown-pragmas" +#pragma GCC diagnostic ignored "-Wpragmas" +#pragma GCC diagnostic ignored "-Wmisleading-indentation" +#endif + #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file #include "catch.hpp" -- cgit v1.2.3