New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Boost includes: use BOOST_ALLOW_DEPRECATED_HEADERS to suppress warnings #13021
Boost includes: use BOOST_ALLOW_DEPRECATED_HEADERS to suppress warnings #13021
Conversation
#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED | ||
#define BOOST_HEADER_DEPRECATED(a) _Pragma(\"GCC error \\\"stop compilation\\\"\"); | ||
#include <boost/geometry/index/rtree.hpp> | ||
int main() { return 0; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bangerth This isn't particularly pretty but it works: I had to override the BOOST_HEADER_DEPRECATED(a)
macro in order to force a compilation error. -Werror
doesn't help here because a #pragma message
is not a warning...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, clever. That's why my test didn't fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That works. I think I would have just added -DBOOST_ALLOW_DEPRECATED_HEADERS
to the compile flags directly in the cmake script. This way you don't have to touch the sources, but you're still specific which versions of BOOST receive the treatment.
#define BOOST_CONFIG_HEADER_DEPRECATED_HPP_INCLUDED | ||
#define BOOST_HEADER_DEPRECATED(a) _Pragma(\"GCC error \\\"stop compilation\\\"\"); | ||
#include <boost/geometry/index/rtree.hpp> | ||
int main() { return 0; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, clever. That's why my test didn't fail.
3edd4f6
to
1c2f6c4
Compare
/rebuild |
Close #13020