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
174 #else // OMWi_DOXYGEN_PREDEFINE
175 #define OMW_PARCH_x86_32 (1)
176 #define OMW_PARCH_x86_64 (1)
177 #define OMW_PARCH_ARM32 (1)
178 #define OMW_PARCH_ARM64 (1)
179 #define OMW_PARCH_POWERPC (1)
180 #define OMW_PARCH_UNKNOWN (1)
181 #endif // OMWi_DOXYGEN_PREDEFINE
191 #ifndef OMWi_DOXYGEN_PREDEFINE
194 #define OMW_CPPSTD (_MSVC_LANG)
196 #define OMW_CPPSTD (__cplusplus)
199 #else // OMWi_DOXYGEN_PREDEFINE
201 #endif // OMWi_DOXYGEN_PREDEFINE
205 #define OMW_CPPSTD_98 (199711L)
206 #define OMW_CPPSTD_11 (201103L)
207 #define OMW_CPPSTD_14 (201402L)
208 #define OMW_CPPSTD_17 (201703L)
209 #define OMW_CPPSTD_20 (202002L)
214 #define OMW_CPPSTD_23 (202100L)
224 #define OMW_DEBUG (1)
227 #if (OMW_CPPSTD >= OMW_CPPSTD_14)
228 #define OMW__FILENAME__ (OMWi_file_to_filename(__FILE__))
231 #ifdef OMWi_DOXYGEN_PREDEFINE
232 #define OMW_DEBUG (1)
233 #define OMW__FILENAME__
234 #endif // OMWi_DOXYGEN_PREDEFINE
257 #ifndef OMWi_DOXYGEN_PREDEFINE
259 #define OMWi_DISPSTR(x) (x)
261 #ifdef OMW__FILENAME__
262 constexpr
const char* OMWi_file_to_filename(
const char* p)
267 #if defined(OMW_PLAT_WIN)
268 if (*p++ ==
'\\') fn = p;
270 if (*p++ ==
'/') fn = p;
275 #endif // OMW__FILENAME__
277 #endif // OMWi_DOXYGEN_PREDEFINE
327 #endif // IG_OMW_DEFS_H