Go to the documentation of this file.
31 #ifndef OMWi_DOXYGEN_PREDEFINE
33 #if defined(__clang__)
34 #define OMW_CXX_CLANG (1)
35 #elif defined(__GNUC__) || defined(__GNUG__)
36 #define OMW_CXX_GCC (1)
37 #elif defined(_MSC_VER)
38 #define OMW_CXX_MSVC (1)
39 #elif defined(__MINGW32__)
40 #define OMW_CXX_MINGW32 (1)
41 #elif defined(__MINGW64__)
42 #define OMW_CXX_MINGW64 (1)
43 #elif defined(__EMSCRIPTEN__)
44 #define OMW_CXX_EMSCRIPTEN (1)
46 #define OMW_CXX_UNKNOWN (1)
49 #else // OMWi_DOXYGEN_PREDEFINE
50 #define OMW_CXX_CLANG (1)
51 #define OMW_CXX_GCC (1)
52 #define OMW_CXX_MSVC (1)
53 #define OMW_CXX_MINGW32 (1)
54 #define OMW_CXX_MINGW64 (1)
55 #define OMW_CXX_EMSCRIPTEN (1)
56 #define OMW_CXX_UNKNOWN (1)
57 #endif // OMWi_DOXYGEN_PREDEFINE
72 #ifndef OMWi_DOXYGEN_PREDEFINE
75 #define OMW_PLAT_WIN (1)
77 #define OMW_PLAT_WIN64 (1)
79 #define OMW_PLAT_WIN32 (1)
83 #if (defined(__unix__) || defined(__unix))
84 #define OMW_PLAT_UNIX (1)
87 #define OMW_PLAT_POSIX (1)
88 #endif // _POSIX_VERSION
92 #define OMW_PLAT_LINUX (1)
95 #if (defined(__APPLE__) && defined(__MACH__))
96 #define OMW_PLAT_APPLE (1)
101 #if (defined(OMW_PLAT_UNIX) || defined(OMW_PLAT_APPLE))
102 #include <sys/param.h>
104 #define OMW_PLAT_BSD (1)
106 #endif // Unix or Apple
108 #if !(defined(OMW_PLAT_WIN) || defined(OMW_PLAT_UNIX) || defined(OMW_PLAT_LINUX) || defined(OMW_PLAT_APPLE))
109 #define OMW_PLAT_UNKNOWN (1)
114 #else // OMWi_DOXYGEN_PREDEFINE
115 #define OMW_PLAT_WIN (1)
116 #define OMW_PLAT_WIN32 (1)
117 #define OMW_PLAT_WIN64 (1)
118 #define OMW_PLAT_UNIX (1)
119 #define OMW_PLAT_POSIX (1)
120 #define OMW_PLAT_LINUX (1)
121 #define OMW_PLAT_APPLE (1)
122 #define OMW_PLAT_BSD (1)
123 #define OMW_PLAT_UNKNOWN (1)
124 #endif // OMWi_DOXYGEN_PREDEFINE
138 #ifndef OMWi_DOXYGEN_PREDEFINE
143 #define OMW_PARCH_x86_32 (1)
144 #elif (defined(_M_AMD64) || defined(_M_X64))
145 #define OMW_PARCH_x86_64 (1)
146 #elif defined(_M_ARM64)
147 #define OMW_PARCH_ARM64 (1)
148 #elif defined(_M_ARM)
149 #define OMW_PARCH_ARM32 (1)
151 #define OMW_PARCH_UNKNOWN (1)
154 #else // OMW_CXX_MSVC
156 #if defined(__i386__)
157 #define OMW_PARCH_x86_32 (1)
158 #elif defined(__x86_64__)
159 #define OMW_PARCH_x86_64 (1)
160 #elif defined(__aarch64__)
161 #define OMW_PARCH_ARM64 (1)
162 #elif defined(__arm__)
163 #define OMW_PARCH_ARM32 (1)
164 #elif defined(__powerpc64__)
165 #define OMW_PARCH_POWERPC (1)
167 #define OMW_PARCH_UNKNOWN (1)
170 #endif // OMW_CXX_MSVC
186 #else // OMWi_DOXYGEN_PREDEFINE
187 #define OMW_PARCH_x86_32 (1)
188 #define OMW_PARCH_x86_64 (1)
189 #define OMW_PARCH_ARM32 (1)
190 #define OMW_PARCH_ARM64 (1)
191 #define OMW_PARCH_POWERPC (1)
192 #define OMW_PARCH_UNKNOWN (1)
194 #endif // OMWi_DOXYGEN_PREDEFINE
204 #ifndef OMWi_DOXYGEN_PREDEFINE
207 #define OMW_CPPSTD (_MSVC_LANG)
209 #define OMW_CPPSTD (__cplusplus)
212 #else // OMWi_DOXYGEN_PREDEFINE
214 #endif // OMWi_DOXYGEN_PREDEFINE
218 #define OMW_CPPSTD_98 (199711L)
219 #define OMW_CPPSTD_11 (201103L)
220 #define OMW_CPPSTD_14 (201402L)
221 #define OMW_CPPSTD_17 (201703L)
222 #define OMW_CPPSTD_20 (202002L)
229 #define OMW_CPPSTD_23 (202100L)
239 #define OMW_DEBUG (1)
242 #if (OMW_CPPSTD >= OMW_CPPSTD_14)
243 #define OMW__FILENAME__ (OMWi_file_to_filename(__FILE__))
246 #ifdef OMWi_DOXYGEN_PREDEFINE
247 #define OMW_DEBUG (1)
248 #define OMW__FILENAME__
249 #endif // OMWi_DOXYGEN_PREDEFINE
272 #ifndef OMWi_DOXYGEN_PREDEFINE
274 #define OMWi_DISPSTR(x) (x)
276 #ifdef OMW__FILENAME__
277 constexpr
const char* OMWi_file_to_filename(
const char* p)
282 #if defined(OMW_PLAT_WIN)
283 if (*p++ ==
'\\') fn = p;
285 if (*p++ ==
'/') fn = p;
290 #endif // OMW__FILENAME__
292 #endif // OMWi_DOXYGEN_PREDEFINE
342 #endif // IG_OMW_DEFS_H