Skip to content

Commit

Permalink
macOS: [skip ci] suppress some more Py3.8 warnings, suppress warnings…
Browse files Browse the repository at this point in the history
… about deprecated OpenGL API
  • Loading branch information
wwmayer committed Oct 17, 2020
1 parent 28270e5 commit 01af171
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions cMake/FreeCAD_Helpers/CompilerChecksAndSetups.cmake
Expand Up @@ -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")
Expand Down
9 changes: 9 additions & 0 deletions src/App/FeaturePythonPyImp.h
Expand Up @@ -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_ \
{ \
Expand Down Expand Up @@ -137,4 +142,8 @@ class FeaturePythonPyT : public FeaturePyT

#include "FeaturePythonPyImp.inl"

#if defined(__clang__)
# pragma clang diagnostic pop
#endif

#endif // APP_FEATUREPYTHONPYIMP_H
9 changes: 9 additions & 0 deletions src/Base/PyObjectBase.cpp
Expand Up @@ -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*/
Expand Down Expand Up @@ -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
------------------------------*/
Expand Down
1 change: 1 addition & 0 deletions src/Base/swigpyrun.cpp
Expand Up @@ -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"
Expand Down

0 comments on commit 01af171

Please sign in to comment.