macOS: [skip ci] suppress some more Py3.8 warnings, suppress warnings about deprecated OpenGL API

This commit is contained in:
wmayer
2020-10-17 23:53:47 +02:00
parent 0f007c1370
commit 409ceb6ec5
4 changed files with 20 additions and 0 deletions

View File

@@ -95,6 +95,7 @@ macro(CompilerChecksAndSetups)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")
endif()
add_definitions(-DGL_SILENCE_DEPRECATION)
elseif (UNIX)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.9)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-undefined-var-template")

View File

@@ -27,6 +27,11 @@
#include <Base/Interpreter.h>
#include <App/PropertyContainerPy.h>
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wmissing-field-initializers"
#endif
#define PYTHON_TYPE_DEF(_class_, _subclass_) \
class _class_ : public _subclass_ \
{ \
@@ -137,4 +142,8 @@ private:
#include "FeaturePythonPyImp.inl"
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
#endif // APP_FEATUREPYTHONPYIMP_H

View File

@@ -75,6 +75,11 @@ PyObjectBase::~PyObjectBase()
* 0 and define tp_base as 0.
*/
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
PyTypeObject PyObjectBase::Type = {
PyVarObject_HEAD_INIT(&PyType_Type,0)
"PyObjectBase", /*tp_name*/
@@ -142,6 +147,10 @@ PyTypeObject PyObjectBase::Type = {
#endif
};
#if defined(__clang__)
# pragma clang diagnostic pop
#endif
/*------------------------------
* PyObjectBase Methods -- Every class, even the abstract one should have a Methods
------------------------------*/

View File

@@ -29,6 +29,7 @@
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-register"
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined (__GNUC__)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wmissing-field-initializers"