[libcalamares] Reduce warnings with Clang 9 (Boost::Python)

- The boost headers fall foul of tons of Clang warnings, so introduce
   a mechanism like moc-headers for turning off most of those warnings.
This commit is contained in:
Adriaan de Groot 2019-11-26 17:24:55 +01:00
parent 2e22bdd7dc
commit ac75c63001
4 changed files with 24 additions and 0 deletions

View File

@ -26,8 +26,13 @@
#include <QFileInfo>
#undef slots
#include "utils/boost-warnings.h"
#include <boost/python.hpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace bp = boost::python;
namespace CalamaresPython

View File

@ -25,10 +25,16 @@
#include <QStringList>
#undef slots
#include "utils/boost-warnings.h"
#include <boost/python/dict.hpp>
#include <boost/python/list.hpp>
#include <boost/python/object.hpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace CalamaresPython
{

View File

@ -32,8 +32,13 @@
#include <QStandardPaths>
#undef slots
#include "utils/boost-warnings.h"
#include <boost/python.hpp>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
namespace bp = boost::python;
static int

View File

@ -0,0 +1,8 @@
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wreserved-id-macro"
#pragma clang diagnostic ignored "-Wold-style-cast"
#pragma clang diagnostic ignored "-Wzero-as-null-pointer-constant"
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
#pragma clang diagnostic ignored "-Wall"
#endif