libcalamares: use Pybind11Helpers consistently
This header includes all of the needed pybind11 headers, but also wrangles defines and warnings in one spot.
This commit is contained in:
parent
019450132e
commit
f24df7ccc9
@ -14,6 +14,7 @@
|
|||||||
#include "compat/Variant.h"
|
#include "compat/Variant.h"
|
||||||
#include "locale/Global.h"
|
#include "locale/Global.h"
|
||||||
#include "partition/Mount.h"
|
#include "partition/Mount.h"
|
||||||
|
#include "python/Pybind11Helpers.h"
|
||||||
#include "python/PythonJob.h"
|
#include "python/PythonJob.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
#include "utils/RAII.h"
|
#include "utils/RAII.h"
|
||||||
@ -26,10 +27,6 @@
|
|||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#undef slots
|
|
||||||
#include <pybind11/embed.h>
|
|
||||||
#include <pybind11/pybind11.h>
|
|
||||||
|
|
||||||
namespace py = pybind11;
|
namespace py = pybind11;
|
||||||
|
|
||||||
/** @namespace
|
/** @namespace
|
||||||
|
@ -18,8 +18,7 @@
|
|||||||
|
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#undef slots
|
#include "python/Pybind11Helpers.h"
|
||||||
#include <pybind11/pybind11.h>
|
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -14,9 +14,27 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic push
|
||||||
|
#pragma clang diagnostic ignored "-Wcovered-switch-default"
|
||||||
|
#pragma clang diagnostic ignored "-Wfloat-equal"
|
||||||
|
#pragma clang diagnostic ignored "-Wweak-vtables"
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-variable-declarations"
|
||||||
|
#pragma clang diagnostic ignored "-Wold-style-cast"
|
||||||
|
#pragma clang diagnostic ignored "-Wshadow-uncaptured-local"
|
||||||
|
#pragma clang diagnostic ignored "-Wshadow-field-in-constructor"
|
||||||
|
#pragma clang diagnostic ignored "-Wshadow-field"
|
||||||
|
#pragma clang diagnostic ignored "-Wdocumentation"
|
||||||
|
#pragma clang diagnostic ignored "-Wmissing-noreturn"
|
||||||
|
#pragma clang diagnostic ignored "-Wreserved-identifier"
|
||||||
|
#endif
|
||||||
|
|
||||||
#undef slots
|
#undef slots
|
||||||
#include <pybind11/pybind11.h>
|
#include <pybind11/pybind11.h>
|
||||||
|
|
||||||
|
#include <pybind11/embed.h>
|
||||||
|
#include <pybind11/eval.h>
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
namespace Python __attribute__( ( visibility( "hidden" ) ) )
|
namespace Python __attribute__( ( visibility( "hidden" ) ) )
|
||||||
@ -35,4 +53,9 @@ namespace Python __attribute__( ( visibility( "hidden" ) ) )
|
|||||||
|
|
||||||
} // namespace Python
|
} // namespace Python
|
||||||
} // namespace Calamares
|
} // namespace Calamares
|
||||||
|
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma clang diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -13,16 +13,13 @@
|
|||||||
#include "JobQueue.h"
|
#include "JobQueue.h"
|
||||||
#include "python/Api.h"
|
#include "python/Api.h"
|
||||||
#include "python/Logger.h"
|
#include "python/Logger.h"
|
||||||
|
#include "python/Pybind11Helpers.h"
|
||||||
#include "utils/Logger.h"
|
#include "utils/Logger.h"
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#undef slots
|
|
||||||
#include <pybind11/embed.h>
|
|
||||||
#include <pybind11/eval.h>
|
|
||||||
|
|
||||||
namespace py = pybind11;
|
namespace py = pybind11;
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user