X-Git-Url: http://git.osdn.net/view?p=mutilities%2FMUtilities.git;a=blobdiff_plain;f=docs%2Fd0%2Fdd7%2F_version_8h_source.html;fp=docs%2Fd0%2Fdd7%2F_version_8h_source.html;h=ef83896c923f8892cb3f56491a7fe1691f93aa26;hp=74846e4b9d98518cfb1d0492042c84fe6050ac65;hb=f1a001819b97cec0907250cc7fdc7e1d215feeb3;hpb=49e64e2542cdc7de5bc027358bb0525747d8e9b8 diff --git a/docs/d0/dd7/_version_8h_source.html b/docs/d0/dd7/_version_8h_source.html index 74846e4..ef83896 100644 --- a/docs/d0/dd7/_version_8h_source.html +++ b/docs/d0/dd7/_version_8h_source.html @@ -67,7 +67,7 @@ $(function() {
Version.h
-
1 // MuldeR's Utilities for Qt
3 // Copyright (C) 2004-2021 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //
19 // http://www.gnu.org/licenses/lgpl-2.1.txt
21 
22 #pragma once
23 
24 //MUtils
25 #include <MUtils/Global.h>
26 
27 //Qt
28 #include <QString>
29 #include <QDate>
30 #include <QTime>
31 
32 namespace MUtils
33 {
34  class Version
35  {
36  public:
37  //Get Library Version Numbers
38  MUTILS_API static const quint32 &lib_version_major(void);
39  MUTILS_API static const quint32 &lib_version_minor(void);
40 
41  //Get Library Build Date/Time
42  MUTILS_API static const QDate lib_build_date(void);
43  MUTILS_API static const QTime lib_build_time(void);
44 
45  //Get Application Build Date/Time
46  MUTILS_API static const QDate app_build_date(const char *const date_str = build_date_raw());
47  MUTILS_API static const QTime app_build_time(const char *const time_str = build_time_raw());
48 
49  //Compiler detection
50  static const char *const compiler_version(void)
51  {
52  static const char *const COMPILER_VERS =
53  #if defined(__INTEL_COMPILER)
54  #if (__INTEL_COMPILER >= 1500)
55  "ICL 15." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
56  #elif (__INTEL_COMPILER >= 1400)
57  "ICL 14." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
58  #elif (__INTEL_COMPILER >= 1300)
59  "ICL 13." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
60  #elif (__INTEL_COMPILER >= 1200)
61  "ICL 12." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
62  #elif (__INTEL_COMPILER >= 1100)
63  "ICL 11.x";
64  #elif (__INTEL_COMPILER >= 1000)
65  "ICL 10.x";
66  #else
67  #error Compiler is not supported!
68  #endif
69  #elif defined(_MSC_VER)
70  #if (_MSC_VER == 1929)
71  #if (_MSC_FULL_VER < 192930133)
72  "MSVC 2019.10";
73  #else
74  "MSVC 2019.11";
75  #endif
76  #elif (_MSC_VER == 1928)
77  #if (_MSC_FULL_VER < 192829910)
78  "MSVC 2019.8";
79  #else
80  "MSVC 2019.9";
81  #endif
82  #elif (_MSC_VER == 1927)
83  "MSVC 2019.7";
84  #elif (_MSC_VER == 1926)
85  "MSVC 2019.6";
86  #elif (_MSC_VER == 1925)
87  "MSVC 2019.5";
88  #elif (_MSC_VER == 1924)
89  "MSVC 2019.4";
90  #elif (_MSC_VER == 1923)
91  "MSVC 2019.3";
92  #elif (_MSC_VER == 1922)
93  "MSVC 2019.2";
94  #elif (_MSC_VER == 1921)
95  "MSVC 2019.1";
96  #elif (_MSC_VER == 1920)
97  "MSVC 2019.0";
98  #elif (_MSC_VER == 1916)
99  "MSVC 2017.9";
100  #elif (_MSC_VER == 1915)
101  "MSVC 2017.8";
102  #elif (_MSC_VER == 1914)
103  "MSVC 2017.7";
104  #elif (_MSC_VER == 1913)
105  "MSVC 2017.6";
106  #elif (_MSC_VER == 1912)
107  "MSVC 2017.5";
108  #elif (_MSC_VER == 1911)
109  "MSVC 2017.4";
110  #elif (_MSC_VER == 1910)
111  "MSVC 2017.2";
112  #elif (_MSC_VER == 1900)
113  #if (_MSC_FULL_VER == 190023026)
114  "MSVC 2015";
115  #elif (_MSC_FULL_VER == 190023506)
116  "MSVC 2015.1";
117  #elif (_MSC_FULL_VER == 190023918)
118  "MSVC 2015.2";
119  #elif (_MSC_FULL_VER == 190024210) || (_MSC_FULL_VER == 190024215)
120  "MSVC 2015.3";
121  #else
122  #error Compiler version is not supported yet!
123  #endif
124  #elif (_MSC_VER == 1800)
125  #if (_MSC_FULL_VER == 180021005)
126  "MSVC 2013";
127  #elif (_MSC_FULL_VER == 180030501)
128  "MSVC 2013.2";
129  #elif (_MSC_FULL_VER == 180030723)
130  "MSVC 2013.3";
131  #elif (_MSC_FULL_VER == 180031101)
132  "MSVC 2013.4";
133  #elif (_MSC_FULL_VER == 180040629)
134  "MSVC 2013.5";
135  #else
136  #error Compiler version is not supported yet!
137  #endif
138  #elif (_MSC_VER == 1700)
139  #if (_MSC_FULL_VER == 170050727)
140  "MSVC 2012";
141  #elif (_MSC_FULL_VER == 170051106)
142  "MSVC 2012.1";
143  #elif (_MSC_FULL_VER == 170060315)
144  "MSVC 2012.2";
145  #elif (_MSC_FULL_VER == 170060610)
146  "MSVC 2012.3";
147  #elif (_MSC_FULL_VER == 170061030)
148  "MSVC 2012.4";
149  #else
150  #error Compiler version is not supported yet!
151  #endif
152  #elif (_MSC_VER == 1600)
153  #if (_MSC_FULL_VER >= 160040219)
154  "MSVC 2010-SP1";
155  #else
156  "MSVC 2010";
157  #endif
158  #else
159  #error Compiler is not supported!
160  #endif
161  #else
162  #error Compiler is not supported!
163  #endif
164  return COMPILER_VERS;
165  }
166 
167  //Architecture detection
168  static const char *const compiler_arch(void)
169  {
170  static const char *const COMPILER_ARCH =
171  #if defined(_M_X64)
172  "x64";
173  #elif defined(_M_IX86)
174  "x86";
175  #else
176  #error Architecture is not supported!
177  #endif
178  return COMPILER_ARCH;
179  }
180 
181  private:
182  //Raw Build date
183  static const char *const build_date_raw(void)
184  {
185  static const char *const RAW_BUILD_DATE = __DATE__;
186  return RAW_BUILD_DATE;
187  }
188 
189  //Raw Build time
190  static const char *const build_time_raw(void)
191  {
192  static const char *const RAW_BUILD_TIME = __TIME__;
193  return RAW_BUILD_TIME;
194  }
195 
196  //Disable construction
197  Version(void) { throw 666; }
198  Version(const Version&) { throw 666; }
199  };
200 }
201 
Definition: Version.h:34
+
1 // MuldeR's Utilities for Qt
3 // Copyright (C) 2004-2022 LoRd_MuldeR <MuldeR2@GMX.de>
4 //
5 // This library is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU Lesser General Public
7 // License as published by the Free Software Foundation; either
8 // version 2.1 of the License, or (at your option) any later version.
9 //
10 // This library is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 // Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with this library; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //
19 // http://www.gnu.org/licenses/lgpl-2.1.txt
21 
22 #pragma once
23 
24 //MUtils
25 #include <MUtils/Global.h>
26 
27 //Qt
28 #include <QString>
29 #include <QDate>
30 #include <QTime>
31 
32 namespace MUtils
33 {
34  class Version
35  {
36  public:
37  //Get Library Version Numbers
38  MUTILS_API static const quint32 &lib_version_major(void);
39  MUTILS_API static const quint32 &lib_version_minor(void);
40 
41  //Get Library Build Date/Time
42  MUTILS_API static const QDate lib_build_date(void);
43  MUTILS_API static const QTime lib_build_time(void);
44 
45  //Get Application Build Date/Time
46  MUTILS_API static const QDate app_build_date(const char *const date_str = build_date_raw());
47  MUTILS_API static const QTime app_build_time(const char *const time_str = build_time_raw());
48 
49  //Compiler detection
50  static const char *const compiler_version(void)
51  {
52  static const char *const COMPILER_VERS =
53  #if defined(__INTEL_COMPILER)
54  #if (__INTEL_COMPILER >= 1500)
55  "ICL 15." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
56  #elif (__INTEL_COMPILER >= 1400)
57  "ICL 14." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
58  #elif (__INTEL_COMPILER >= 1300)
59  "ICL 13." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
60  #elif (__INTEL_COMPILER >= 1200)
61  "ICL 12." MUTILS_MAKE_STRING(__INTEL_COMPILER_BUILD_DATE);
62  #elif (__INTEL_COMPILER >= 1100)
63  "ICL 11.x";
64  #elif (__INTEL_COMPILER >= 1000)
65  "ICL 10.x";
66  #else
67  #error Compiler is not supported!
68  #endif
69  #elif defined(_MSC_VER)
70  #if (_MSC_VER == 1932)
71  "MSVC 2022.2";
72  #elif (_MSC_VER == 1931)
73  "MSVC 2022.1";
74  #elif (_MSC_VER == 1930)
75  #if (_MSC_FULL_VER <= 193030706)
76  "MSVC 2022.0";
77  #else
78  #error Compiler version is not supported yet!
79  #endif
80  #elif (_MSC_VER == 1929)
81  #if (_MSC_FULL_VER < 192930133)
82  "MSVC 2019.10";
83  #else
84  "MSVC 2019.11";
85  #endif
86  #elif (_MSC_VER == 1928)
87  #if (_MSC_FULL_VER < 192829910)
88  "MSVC 2019.8";
89  #else
90  "MSVC 2019.9";
91  #endif
92  #elif (_MSC_VER == 1927)
93  "MSVC 2019.7";
94  #elif (_MSC_VER == 1926)
95  "MSVC 2019.6";
96  #elif (_MSC_VER == 1925)
97  "MSVC 2019.5";
98  #elif (_MSC_VER == 1924)
99  "MSVC 2019.4";
100  #elif (_MSC_VER == 1923)
101  "MSVC 2019.3";
102  #elif (_MSC_VER == 1922)
103  "MSVC 2019.2";
104  #elif (_MSC_VER == 1921)
105  "MSVC 2019.1";
106  #elif (_MSC_VER == 1920)
107  "MSVC 2019.0";
108  #elif (_MSC_VER == 1916)
109  "MSVC 2017.9";
110  #elif (_MSC_VER == 1915)
111  "MSVC 2017.8";
112  #elif (_MSC_VER == 1914)
113  "MSVC 2017.7";
114  #elif (_MSC_VER == 1913)
115  "MSVC 2017.6";
116  #elif (_MSC_VER == 1912)
117  "MSVC 2017.5";
118  #elif (_MSC_VER == 1911)
119  "MSVC 2017.4";
120  #elif (_MSC_VER == 1910)
121  "MSVC 2017.2";
122  #elif (_MSC_VER == 1900)
123  #if (_MSC_FULL_VER == 190023026)
124  "MSVC 2015";
125  #elif (_MSC_FULL_VER == 190023506)
126  "MSVC 2015.1";
127  #elif (_MSC_FULL_VER == 190023918)
128  "MSVC 2015.2";
129  #elif (_MSC_FULL_VER == 190024210) || (_MSC_FULL_VER == 190024215)
130  "MSVC 2015.3";
131  #else
132  #error Compiler version is not supported yet!
133  #endif
134  #elif (_MSC_VER == 1800)
135  #if (_MSC_FULL_VER == 180021005)
136  "MSVC 2013";
137  #elif (_MSC_FULL_VER == 180030501)
138  "MSVC 2013.2";
139  #elif (_MSC_FULL_VER == 180030723)
140  "MSVC 2013.3";
141  #elif (_MSC_FULL_VER == 180031101)
142  "MSVC 2013.4";
143  #elif (_MSC_FULL_VER == 180040629)
144  "MSVC 2013.5";
145  #else
146  #error Compiler version is not supported yet!
147  #endif
148  #elif (_MSC_VER == 1700)
149  #if (_MSC_FULL_VER == 170050727)
150  "MSVC 2012";
151  #elif (_MSC_FULL_VER == 170051106)
152  "MSVC 2012.1";
153  #elif (_MSC_FULL_VER == 170060315)
154  "MSVC 2012.2";
155  #elif (_MSC_FULL_VER == 170060610)
156  "MSVC 2012.3";
157  #elif (_MSC_FULL_VER == 170061030)
158  "MSVC 2012.4";
159  #else
160  #error Compiler version is not supported yet!
161  #endif
162  #elif (_MSC_VER == 1600)
163  #if (_MSC_FULL_VER >= 160040219)
164  "MSVC 2010-SP1";
165  #else
166  "MSVC 2010";
167  #endif
168  #else
169  #error Compiler is not supported!
170  #endif
171  #else
172  #error Compiler is not supported!
173  #endif
174  return COMPILER_VERS;
175  }
176 
177  //Architecture detection
178  static const char *const compiler_arch(void)
179  {
180  static const char *const COMPILER_ARCH =
181  #if defined(_M_X64)
182  "x64";
183  #elif defined(_M_IX86)
184  "x86";
185  #else
186  #error Architecture is not supported!
187  #endif
188  return COMPILER_ARCH;
189  }
190 
191  private:
192  //Raw Build date
193  static const char *const build_date_raw(void)
194  {
195  static const char *const RAW_BUILD_DATE = __DATE__;
196  return RAW_BUILD_DATE;
197  }
198 
199  //Raw Build time
200  static const char *const build_time_raw(void)
201  {
202  static const char *const RAW_BUILD_TIME = __TIME__;
203  return RAW_BUILD_TIME;
204  }
205 
206  //Disable construction
207  Version(void) { throw 666; }
208  Version(const Version&) { throw 666; }
209  };
210 }
211 
Definition: Version.h:34
This file contains miscellaneous functions that are generally useful for Qt-based applications...
Global MUtils namespace.
Definition: CPUFeatures.h:37