1 |
francois |
283 |
//------------------------------------------------------------ |
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 |
francois |
375 |
#include <stdio.h> |
26 |
|
|
#include <string.h> |
27 |
francois |
283 |
|
28 |
francois |
112 |
#ifdef __BORLANDC__ |
29 |
francois |
283 |
#define BORLANDCPP |
30 |
|
|
#endif |
31 |
francois |
112 |
#ifdef _MSC_VER |
32 |
francois |
283 |
#define VISUALCPPNET |
33 |
|
|
#endif |
34 |
francois |
112 |
#ifdef __GNUC__ |
35 |
francois |
283 |
#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 |
francois |
381 |
//#define VERSION "2012" |
62 |
|
|
//#define DATEVERSION "1999-2012" |
63 |
francois |
283 |
|
64 |
francois |
375 |
|
65 |
|
|
// Check windows |
66 |
|
|
#if _WIN32 || _WIN64 |
67 |
|
|
#if _WIN64 |
68 |
|
|
#define _64BITS |
69 |
francois |
283 |
#else |
70 |
francois |
375 |
#define _32BITS |
71 |
francois |
283 |
#endif |
72 |
|
|
#endif |
73 |
francois |
375 |
|
74 |
|
|
// Check GCC |
75 |
|
|
#if __GNUC__ |
76 |
|
|
#if __x86_64__ || __ppc64__ |
77 |
|
|
#define _64BITS |
78 |
francois |
283 |
#else |
79 |
francois |
375 |
#define _32BITS |
80 |
francois |
283 |
#endif |
81 |
francois |
375 |
#endif |
82 |
|
|
class GESTIONVERSION |
83 |
|
|
{ |
84 |
|
|
public: |
85 |
|
|
void print(char* version) |
86 |
|
|
{ |
87 |
francois |
377 |
sprintf(version,"MAGIC %s:%s compiled %s at %s \nOptions=",VERSION,DATEVERSION,__DATE__,__TIME__); |
88 |
francois |
375 |
#ifdef GCC |
89 |
|
|
sprintf(version,"%sGCC|",version); |
90 |
|
|
#endif |
91 |
|
|
#ifdef BORLANDCPP |
92 |
|
|
sprintf(version,"%sBORLAND|",version); |
93 |
|
|
#endif |
94 |
|
|
#ifdef VISUALCPPNET |
95 |
|
|
sprintf(version,"%sMICROSOFT|",version); |
96 |
|
|
#endif |
97 |
|
|
#ifdef _64BITS |
98 |
|
|
sprintf(version,"%s64BITS|",version); |
99 |
|
|
#endif |
100 |
|
|
#ifdef _32BITS |
101 |
|
|
sprintf(version,"%s32BITS|",version); |
102 |
|
|
#endif |
103 |
|
|
#ifdef BREP_SLD |
104 |
|
|
sprintf(version,"%sSW|",version); |
105 |
|
|
#endif |
106 |
|
|
#ifdef BREP_SAT |
107 |
|
|
sprintf(version,"%sSAT|",version); |
108 |
|
|
#endif |
109 |
|
|
#ifdef BREP_STEP |
110 |
|
|
sprintf(version,"%sSTEP|",version); |
111 |
|
|
#endif |
112 |
|
|
#ifdef BREP_OCC |
113 |
|
|
sprintf(version,"%sOCC|",version); |
114 |
|
|
#endif |
115 |
|
|
#ifdef IBREP |
116 |
|
|
sprintf(version,"%sIBREP|",version); |
117 |
|
|
#endif |
118 |
|
|
#ifdef VTK_INTERFACE |
119 |
|
|
sprintf(version,"%sVTKINTERFACE|",version); |
120 |
|
|
#endif |
121 |
|
|
#ifdef BREP_USE_ENGLISH |
122 |
|
|
sprintf(version,"%sENGLISH|",version); |
123 |
|
|
#else |
124 |
|
|
sprintf(version,"%sFRANCAIS|",version); |
125 |
|
|
#endif |
126 |
|
|
version[strlen(version)-1]=0; |
127 |
|
|
}; |
128 |
|
|
|
129 |
|
|
}; |
130 |
francois |
283 |
|
131 |
|
|
|
132 |
|
|
#endif |
133 |
|
|
|