1 ///////////////////////////////////////////////////////////////////////////////
2 // MuldeR's Utilities for Qt
3 // Copyright (C) 2004-2023 LoRd_MuldeR <MuldeR2@GMX.de>
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.
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.
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
19 // http://www.gnu.org/licenses/lgpl-2.1.txt
20 //////////////////////////////////////////////////////////////////////////////////
25 #include <MUtils/Global.h>
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);
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);
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());
50 static const char *const compiler_version(void)
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)
64 #elif (__INTEL_COMPILER >= 1000)
67 #error Compiler is not supported!
69 #elif defined(_MSC_VER)
70 #if (_MSC_VER == 1940)
72 #elif (_MSC_VER == 1939)
74 #elif (_MSC_VER == 1938)
76 #elif (_MSC_VER == 1937)
78 #elif (_MSC_VER == 1936)
80 #elif (_MSC_VER == 1933)
82 #elif (_MSC_VER == 1932)
84 #elif (_MSC_VER == 1931)
86 #elif (_MSC_VER == 1930)
87 #if (_MSC_FULL_VER <= 193030706)
90 #error Compiler version is not supported yet!
92 #elif (_MSC_VER == 1929)
93 #if (_MSC_FULL_VER < 192930133)
98 #elif (_MSC_VER == 1928)
99 #if (_MSC_FULL_VER < 192829910)
104 #elif (_MSC_VER == 1927)
106 #elif (_MSC_VER == 1926)
108 #elif (_MSC_VER == 1925)
110 #elif (_MSC_VER == 1924)
112 #elif (_MSC_VER == 1923)
114 #elif (_MSC_VER == 1922)
116 #elif (_MSC_VER == 1921)
118 #elif (_MSC_VER == 1920)
120 #elif (_MSC_VER == 1916)
122 #elif (_MSC_VER == 1915)
124 #elif (_MSC_VER == 1914)
126 #elif (_MSC_VER == 1913)
128 #elif (_MSC_VER == 1912)
130 #elif (_MSC_VER == 1911)
132 #elif (_MSC_VER == 1910)
134 #elif (_MSC_VER == 1900)
135 #if (_MSC_FULL_VER == 190023026)
137 #elif (_MSC_FULL_VER == 190023506)
139 #elif (_MSC_FULL_VER == 190023918)
141 #elif (_MSC_FULL_VER == 190024210) || (_MSC_FULL_VER == 190024215)
144 #error Compiler version is not supported yet!
146 #elif (_MSC_VER == 1800)
147 #if (_MSC_FULL_VER == 180021005)
149 #elif (_MSC_FULL_VER == 180030501)
151 #elif (_MSC_FULL_VER == 180030723)
153 #elif (_MSC_FULL_VER == 180031101)
155 #elif (_MSC_FULL_VER == 180040629)
158 #error Compiler version is not supported yet!
160 #elif (_MSC_VER == 1700)
161 #if (_MSC_FULL_VER == 170050727)
163 #elif (_MSC_FULL_VER == 170051106)
165 #elif (_MSC_FULL_VER == 170060315)
167 #elif (_MSC_FULL_VER == 170060610)
169 #elif (_MSC_FULL_VER == 170061030)
172 #error Compiler version is not supported yet!
174 #elif (_MSC_VER == 1600)
175 #if (_MSC_FULL_VER >= 160040219)
181 #error Compiler is not supported!
184 #error Compiler is not supported!
186 return COMPILER_VERS
;
189 //Architecture detection
190 static const char *const compiler_arch(void)
192 static const char *const COMPILER_ARCH
=
195 #elif defined(_M_IX86)
198 #error Architecture is not supported!
200 return COMPILER_ARCH
;
205 static const char *const build_date_raw(void)
207 static const char *const RAW_BUILD_DATE
= __DATE__
;
208 return RAW_BUILD_DATE
;
212 static const char *const build_time_raw(void)
214 static const char *const RAW_BUILD_TIME
= __TIME__
;
215 return RAW_BUILD_TIME
;
218 //Disable construction
219 Version(void) { throw 666; }
220 Version(const Version
&) { throw 666; }
224 ///////////////////////////////////////////////////////////////////////////////