From c9643f4a6f6827908f4d351bb8a3f7a0027b3769 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Mon, 8 Oct 2018 10:43:43 +0200 Subject: Disable C++11 deprecated warning when limiting Eigen to C++98 --- test/indexed_view.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/indexed_view.cpp') diff --git a/test/indexed_view.cpp b/test/indexed_view.cpp index 9a284cf0a..8ede612d1 100644 --- a/test/indexed_view.cpp +++ b/test/indexed_view.cpp @@ -15,6 +15,14 @@ #ifdef EIGEN_TEST_PART_3 // Make sure we also check c++98 max implementation #define EIGEN_MAX_CPP_VER 03 + +// We need to disable this warning when compiling with c++11 while limiting Eigen to c++98 +// Ideally we would rather configure the compiler to build in c++98 mode but this needs +// to be done at the CMakeLists.txt level. +#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) + #pragma GCC diagnostic ignored "-Wdeprecated" +#endif + #endif #include -- cgit v1.2.3