]> granicus.if.org Git - graphviz/commitdiff
tests: squash Boost header deprecation warnings
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 21 Oct 2022 15:09:49 +0000 (08:09 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 2 Nov 2022 01:55:55 +0000 (18:55 -0700)
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 <boost/core/scoped_enum.hpp>
    instead.'
     17 | BOOST_HEADER_DEPRECATED("<boost/core/scoped_enum.hpp>")
        | ^~~~~~~~~~~~~~~~~~~~~~~

tests/svgpp_context.h
tests/svgpp_document_traverser.cpp

index 250cc43d0e809ff30b4177d2b060d1e228d7b721..548b7c2c711140e5aa0315fa28f64b0502b1a801 100644 (file)
@@ -4,7 +4,14 @@
 
 #include <boost/range/any_range.hpp>
 #include <boost/range/iterator_range_core.hpp>
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
 #include <svgpp/svgpp.hpp>
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
 
 class ISVGAnalyzer;
 
index 9d64213ac6a760ae7406876154a51333845f22aa..210137d0a45ee9689832d96aafa0463ed698627b 100644 (file)
@@ -4,7 +4,14 @@
 
 #include <rapidxml_ns/rapidxml_ns.hpp>
 #include <svgpp/policy/xml/rapidxml_ns.hpp>
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
 #include <svgpp/svgpp.hpp>
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
 
 #include "svgpp_context.h"
 #include "svgpp_document_traverser.h"