From: Matthew Fernandez Date: Fri, 21 Oct 2022 15:09:49 +0000 (-0700) Subject: tests: squash Boost header deprecation warnings X-Git-Tag: 7.0.1~15^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a3e0261401faf4a606d7efdf2f3367ca4bf10bc3;p=graphviz tests: squash Boost header deprecation warnings Boost 1.74.0 deprecates some functions that svgpp is using. Without squashing these, the CMake build fails in CI: [ 86%] Building CXX object tests/CMakeFiles/test_common.dir/svgpp_context.cpp.o In file included from /usr/include/boost/config/header_deprecated.hpp:18, from /usr/include/boost/detail/scoped_enum_emulation.hpp:15, from /usr/include/svgpp/detail/namespace.hpp:13, from /usr/include/svgpp/detail/attribute_name_to_id.hpp:11, from /usr/include/svgpp/attribute_traversal/prioritized.hpp:12, from /usr/include/svgpp/attribute_traversal/attribute_traversal.hpp:10, from /usr/include/svgpp/document_traversal.hpp:10, from /usr/include/svgpp/svgpp.hpp:1, from /builds/graphviz/graphviz/tests/svgpp_context.h:7, from /builds/graphviz/graphviz/tests/svgpp_context.cpp:8: /usr/include/boost/detail/scoped_enum_emulation.hpp:17:1: note: '#pragma message: This header is deprecated. Use instead.' 17 | BOOST_HEADER_DEPRECATED("") | ^~~~~~~~~~~~~~~~~~~~~~~ --- diff --git a/tests/svgpp_context.h b/tests/svgpp_context.h index 250cc43d0..548b7c2c7 100644 --- a/tests/svgpp_context.h +++ b/tests/svgpp_context.h @@ -4,7 +4,14 @@ #include #include +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated" +#endif #include +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif class ISVGAnalyzer; diff --git a/tests/svgpp_document_traverser.cpp b/tests/svgpp_document_traverser.cpp index 9d64213ac..210137d0a 100644 --- a/tests/svgpp_document_traverser.cpp +++ b/tests/svgpp_document_traverser.cpp @@ -4,7 +4,14 @@ #include #include +#ifdef __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wdeprecated" +#endif #include +#ifdef __GNUC__ +#pragma GCC diagnostic pop +#endif #include "svgpp_context.h" #include "svgpp_document_traverser.h"