-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathbasic.cpp
More file actions
120 lines (92 loc) · 2.95 KB
/
Copy pathbasic.cpp
File metadata and controls
120 lines (92 loc) · 2.95 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#include <iostream>
#include "basic.h"
void basic(){
#ifdef NDEBUG
std::cout << "basic/1.0: Hello World Release!\n";
#else
std::cout << "basic/1.0: Hello World Debug!\n";
#endif
// ARCHITECTURES
#ifdef _M_X64
std::cout << " basic/1.0: _M_X64 defined\n";
#endif
#ifdef _M_IX86
std::cout << " basic/1.0: _M_IX86 defined\n";
#endif
#ifdef _M_ARM64
std::cout << " basic/1.0: _M_ARM64 defined\n";
#endif
#if __i386__
std::cout << " basic/1.0: __i386__ defined\n";
#endif
#if __x86_64__
std::cout << " basic/1.0: __x86_64__ defined\n";
#endif
#if __aarch64__
std::cout << " basic/1.0: __aarch64__ defined\n";
#endif
// Libstdc++
#if defined _GLIBCXX_USE_CXX11_ABI
std::cout << " basic/1.0: _GLIBCXX_USE_CXX11_ABI "<< _GLIBCXX_USE_CXX11_ABI << "\n";
#endif
// MSVC runtime
#if defined(_DEBUG)
#if defined(_MT) && defined(_DLL)
std::cout << " basic/1.0: MSVC runtime: MultiThreadedDebugDLL\n";
#elif defined(_MT)
std::cout << " basic/1.0: MSVC runtime: MultiThreadedDebug\n";
#endif
#else
#if defined(_MT) && defined(_DLL)
std::cout << " basic/1.0: MSVC runtime: MultiThreadedDLL\n";
#elif defined(_MT)
std::cout << " basic/1.0: MSVC runtime: MultiThreaded\n";
#endif
#endif
// COMPILER VERSIONS
#if _MSC_VER
std::cout << " basic/1.0: _MSC_VER" << _MSC_VER<< "\n";
#endif
#if _MSVC_LANG
std::cout << " basic/1.0: _MSVC_LANG" << _MSVC_LANG<< "\n";
#endif
#if __cplusplus
std::cout << " basic/1.0: __cplusplus" << __cplusplus<< "\n";
#endif
#if __INTEL_COMPILER
std::cout << " basic/1.0: __INTEL_COMPILER" << __INTEL_COMPILER<< "\n";
#endif
#if __GNUC__
std::cout << " basic/1.0: __GNUC__" << __GNUC__<< "\n";
#endif
#if __GNUC_MINOR__
std::cout << " basic/1.0: __GNUC_MINOR__" << __GNUC_MINOR__<< "\n";
#endif
#if __clang_major__
std::cout << " basic/1.0: __clang_major__" << __clang_major__<< "\n";
#endif
#if __clang_minor__
std::cout << " basic/1.0: __clang_minor__" << __clang_minor__<< "\n";
#endif
#if __apple_build_version__
std::cout << " basic/1.0: __apple_build_version__" << __apple_build_version__<< "\n";
#endif
// SUBSYSTEMS
#if __MSYS__
std::cout << " basic/1.0: __MSYS__" << __MSYS__<< "\n";
#endif
#if __MINGW32__
std::cout << " basic/1.0: __MINGW32__" << __MINGW32__<< "\n";
#endif
#if __MINGW64__
std::cout << " basic/1.0: __MINGW64__" << __MINGW64__<< "\n";
#endif
#if __CYGWIN__
std::cout << " basic/1.0: __CYGWIN__" << __CYGWIN__<< "\n";
#endif
}
void basic_print_vector(const std::vector<std::string> &strings) {
for(std::vector<std::string>::const_iterator it = strings.begin(); it != strings.end(); ++it) {
std::cout << "basic/1.0 " << *it << std::endl;
}
}