1 |
//------------------------------------------------------------ |
2 |
//------------------------------------------------------------ |
3 |
// MAGiC |
4 |
// Jean Christophe Cuilli�e et Vincent FRANCOIS |
5 |
// D�artement de G�ie M�anique - UQTR |
6 |
//------------------------------------------------------------ |
7 |
// Le projet MAGIC est un projet de recherche du d�artement |
8 |
// de g�ie m�anique de l'Universit�du Qu�ec � |
9 |
// Trois Rivi�es |
10 |
// Les librairies ne peuvent �re utilis�s sans l'accord |
11 |
// des auteurs (contact : francois@uqtr.ca) |
12 |
//------------------------------------------------------------ |
13 |
//------------------------------------------------------------ |
14 |
// |
15 |
// gestionversion.h |
16 |
// |
17 |
//------------------------------------------------------------ |
18 |
//------------------------------------------------------------ |
19 |
// COPYRIGHT 2000 |
20 |
// Version du 02/03/2006 �11H20 |
21 |
//------------------------------------------------------------ |
22 |
//------------------------------------------------------------ |
23 |
#ifndef _GESTIONVERSION_ |
24 |
#define _GESTIONVERSION_ |
25 |
#include <stdio.h> |
26 |
#include <string.h> |
27 |
|
28 |
#ifdef __BORLANDC__ |
29 |
#define BORLANDCPP |
30 |
#endif |
31 |
#ifdef _MSC_VER |
32 |
#define VISUALCPPNET |
33 |
#endif |
34 |
#ifdef __GNUC__ |
35 |
#define GCC |
36 |
#endif |
37 |
|
38 |
|
39 |
#ifndef GCC |
40 |
#define WINDOWS_VERSION |
41 |
#define BREP_SLD |
42 |
#endif |
43 |
|
44 |
#ifdef BREP_SLD |
45 |
#define BREP_STEP |
46 |
#endif |
47 |
|
48 |
#ifdef BREP_OCC |
49 |
#ifdef WINDOWS_VERSION |
50 |
#define WNT |
51 |
#define OCCBCB |
52 |
#endif |
53 |
#ifdef GCC |
54 |
#define HAVE_CONFIG_H |
55 |
#define HAVE_FSTREAM |
56 |
#define HAVE_IOSTREAM |
57 |
#define HAVE_LIMITS_H |
58 |
#endif |
59 |
#endif |
60 |
|
61 |
#define NUMVERSION "V4" |
62 |
//#define DATEVERSION "1999-2012" |
63 |
#define VERSIONFICHIER 2.3 |
64 |
|
65 |
// Check windows |
66 |
#if _WIN32 || _WIN64 |
67 |
#if _WIN64 |
68 |
#define _64BITS |
69 |
#else |
70 |
#define _32BITS |
71 |
#endif |
72 |
#endif |
73 |
|
74 |
// Check GCC |
75 |
#if __GNUC__ |
76 |
#if __x86_64__ || __ppc64__ |
77 |
#define _64BITS |
78 |
#else |
79 |
#define _32BITS |
80 |
#endif |
81 |
#endif |
82 |
|
83 |
|
84 |
extern double CODE_ASTER_CPU; |
85 |
extern double CODE_ASTER_ECOULE; |
86 |
|
87 |
class GESTIONVERSION |
88 |
{ |
89 |
public: |
90 |
void print(char* version) |
91 |
{ |
92 |
sprintf(version,"MAGIC %s:%s compiled %s at %s \nOptions=",VERSION,DATEVERSION,__DATE__,__TIME__); |
93 |
#ifdef GCC |
94 |
sprintf(version,"%sGCC|",version); |
95 |
#endif |
96 |
#ifdef BORLANDCPP |
97 |
sprintf(version,"%sBORLAND|",version); |
98 |
#endif |
99 |
#ifdef VISUALCPPNET |
100 |
sprintf(version,"%sMICROSOFT|",version); |
101 |
#endif |
102 |
#ifdef _64BITS |
103 |
sprintf(version,"%s64BITS|",version); |
104 |
#endif |
105 |
#ifdef _32BITS |
106 |
sprintf(version,"%s32BITS|",version); |
107 |
#endif |
108 |
#ifdef BREP_SLD |
109 |
sprintf(version,"%sSW|",version); |
110 |
#endif |
111 |
#ifdef BREP_SAT |
112 |
sprintf(version,"%sSAT|",version); |
113 |
#endif |
114 |
#ifdef BREP_STEP |
115 |
sprintf(version,"%sSTEP|",version); |
116 |
#endif |
117 |
#ifdef BREP_OCC |
118 |
sprintf(version,"%sOCC|",version); |
119 |
#endif |
120 |
#ifdef USECAD4FE |
121 |
sprintf(version,"%sCAD4FE|",version); |
122 |
#endif |
123 |
#ifdef CHOIXTERMASTER |
124 |
sprintf(version,"%sTERMASTER|",version); |
125 |
#endif |
126 |
#ifdef IBREP |
127 |
sprintf(version,"%sIBREP|",version); |
128 |
#endif |
129 |
#ifdef VTK_INTERFACE |
130 |
sprintf(version,"%sVTKINTERFACE|",version); |
131 |
#endif |
132 |
#ifdef _COMPARE_STEP_ |
133 |
sprintf(version,"%sCMPSTEP|",version); |
134 |
#else |
135 |
sprintf(version,"%sCMPMAGiC|",version); |
136 |
#endif |
137 |
#ifdef BREP_USE_ENGLISH |
138 |
sprintf(version,"%sENGLISH|",version); |
139 |
#else |
140 |
sprintf(version,"%sFRANCAIS|",version); |
141 |
#endif |
142 |
version[strlen(version)-1]=0; |
143 |
}; |
144 |
|
145 |
}; |
146 |
|
147 |
|
148 |
#endif |
149 |
|