-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathos.hpp
More file actions
58 lines (51 loc) · 1.2 KB
/
Copy pathos.hpp
File metadata and controls
58 lines (51 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* File: /lib/debug/os.hpp
*
* This file is a part of cpplib project which is distributed under MIT License.
* See file LICENSE for full license details.
*
* Copyright (c) 2020-present Nikita Zuev (V.Slavski!) <[email protected]>
*/
#ifndef CPPLIB__lib__debug__os__hpp
#define CPPLIB__lib__debug__os__hpp
#include "../../lib/utils/enum.hpp"
namespace lib::debug {
LIB_UTILS_ENUM( Os
, ANDROID
, MACOS
, IOS
, LINUX
, WINDOWS
, UNKNOWN
)
#if defined(__ANDROID__)
#define CPPLIB_OS_ANDROID
static constexpr auto os = Os::ANDROID;
#elif defined(__APPLE__)
#if defined(__MACH__)
#define CPPLIB_OS_MACOS
static constexpr auto os = Os::MACOS;
#else
#define CPPLIB_OS_IOS
static constexpr auto os = Os::IOS;
#endif // __MACH__
#elif defined(__linux__)
#define CPPLIB_OS_LINUX
static constexpr auto os = Os::LINUX;
#elif defined(_WIN32)
#define CPPLIB_OS_WINDOWS
static constexpr auto os = Os::WINDOWS;
#else
#define CPPLIB_OS_UNKNOWN
static constexpr auto os = Os::UNKNOWN;
#warning "Unknown OS"
#endif // ...os...
} // namespace lib::debug
LIB_UTILS_ENUM_NAMES( lib::debug::Os
, "ANDROID"
, "MACOS"
, "IOS"
, "LINUX"
, "WINDOWS"
, "UNKNOWN"
)
#endif // CPPLIB__lib__debug__os__hpp