Salome HOME
Ensure cmake_build_type is used in SALOME 9.12.0
[tools/sat_salome.git] / products / patches / GUI-9.10.0-visual-2019.patch
1 diff --git a/src/LightApp/LightApp_Application.cxx b/src/LightApp/LightApp_Application.cxx
2 index 718efbd13..8ed49c997 100644
3 --- a/src/LightApp/LightApp_Application.cxx
4 +++ b/src/LightApp/LightApp_Application.cxx
5 @@ -30,6 +30,7 @@
6  // E.A. : some same symbols : acosh, asinh, ...
7    #include <Standard_math.hxx>
8    #ifndef DISABLE_PYCONSOLE
9 +    #include <Python.h>
10      #include <pymath.h>
11    #endif
12  #endif
13 diff --git a/src/Qtx/QtxRubberBand.cxx b/src/Qtx/QtxRubberBand.cxx
14 index 68908bd00..f078aa0c6 100644
15 --- a/src/Qtx/QtxRubberBand.cxx
16 +++ b/src/Qtx/QtxRubberBand.cxx
17 @@ -29,9 +29,11 @@
18  #include <QPalette>
19  #include <QShowEvent>
20  #include <QVectorIterator>
21 -
22 -#include <math.h>
23 -
24 +#if defined(_MSC_VER) && _MSC_VER >= 1920
25 + #include <cmath>
26 +#else
27 + #include <math.h>
28 +#endif
29  /*!
30    \class QtxAbstractRubberBand
31    \brief Analog of class QRubberBand with possibility of creation non-rectangular contour for selection.
32 diff --git a/src/SALOME_PY/SalomePy.cxx b/src/SALOME_PY/SalomePy.cxx
33 index bcdd520f1..bb648866d 100644
34 --- a/src/SALOME_PY/SalomePy.cxx
35 +++ b/src/SALOME_PY/SalomePy.cxx
36 @@ -25,11 +25,9 @@
37  //  Author : Paul RASCLE, EDF
38  //
39  #ifdef WIN32
40 -// E.A. : On windows with python 2.6, there is a conflict
41 -// E.A. : between pymath.h and Standard_math.h which define
42 -// E.A. : some same symbols : acosh, asinh, ...
43 -#include <Standard_math.hxx>
44 -#include <pymath.h>
45 +  #include <Standard_math.hxx>
46 +  #include <Python.h>
47 +  #include <pymath.h>
48  #endif
49  
50  #include <Python.h>
51 diff --git a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
52 index eea242463..f71ba517f 100644
53 --- a/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
54 +++ b/src/SALOME_PYQT/SalomePyQt/SalomePyQt.cxx
55 @@ -24,11 +24,9 @@
56  // Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
57  
58  #ifdef WIN32
59 -// E.A. : On windows with python 2.6, there is a conflict
60 -// E.A. : between pymath.h and Standard_math.h which define
61 -// E.A. : some same symbols : acosh, asinh, ...
62 -#include <Standard_math.hxx>
63 -#include <pymath.h>
64 +  #include <Standard_math.hxx>
65 +  #include <Python.h>
66 +  #include <pymath.h>
67  #endif
68  
69  #include "SALOME_PYQT_ModuleLight.h" // this include must be first!!!
70 diff --git a/src/SUIT/SUIT_DataObjectKey.cxx b/src/SUIT/SUIT_DataObjectKey.cxx
71 index a68031b2b..5c53249cf 100644
72 --- a/src/SUIT/SUIT_DataObjectKey.cxx
73 +++ b/src/SUIT/SUIT_DataObjectKey.cxx
74 @@ -25,10 +25,14 @@
75  #include <string.h>
76  
77  #ifndef WIN32
78 -#include <typeinfo>
79 -#define _typeinfo std::type_info
80 +  #include <typeinfo>
81 +  #define _typeinfo std::type_info
82  #else
83 -#include <typeinfo.h>
84 +  #if defined(_MSC_VER) && _MSC_VER >= 1920
85 +    #include <typeinfo>
86 +  #else
87 +    #include <typeinfo.h>
88 +  #endif
89  #define _typeinfo type_info
90  #endif
91  
92 diff --git a/src/SUIT/SUIT_DataOwner.cxx b/src/SUIT/SUIT_DataOwner.cxx
93 index 31fa5f047..a0c643d99 100644
94 --- a/src/SUIT/SUIT_DataOwner.cxx
95 +++ b/src/SUIT/SUIT_DataOwner.cxx
96 @@ -23,10 +23,14 @@
97  #include "SUIT_DataOwner.h"
98  
99  #ifndef WIN32
100 -#include <typeinfo>
101 -#define _typeinfo std::type_info
102 +  #include <typeinfo>
103 +  #define _typeinfo std::type_info
104  #else
105 -#include <typeinfo.h>
106 +  #if defined(_MSC_VER) && _MSC_VER >= 1920
107 +    #include <typeinfo>
108 +  #else
109 +    #include <typeinfo.h>
110 +  #endif
111  #define _typeinfo type_info
112  #endif
113  
114 diff --git a/src/SalomeApp/SalomeApp_Application.cxx b/src/SalomeApp/SalomeApp_Application.cxx
115 index 1e9492add..06ec03c08 100644
116 --- a/src/SalomeApp/SalomeApp_Application.cxx
117 +++ b/src/SalomeApp/SalomeApp_Application.cxx
118 @@ -25,11 +25,9 @@
119  // Author:    Sergey LITONIN
120  
121  #ifdef WIN32
122 -  // E.A. : On windows with python 2.6, there is a conflict
123 -  // E.A. : between pymath.h and Standard_math.h which define
124 -  // E.A. : some same symbols : acosh, asinh, ...
125    #include <Standard_math.hxx>
126    #ifndef DISABLE_PYCONSOLE
127 +    #include <Python.h>
128      #include <pymath.h>
129    #endif
130  #endif