Blaze 3.9
Compiler.h
Go to the documentation of this file.
1//=================================================================================================
33//=================================================================================================
34
35#ifndef _BLAZE_SYSTEM_COMPILER_H_
36#define _BLAZE_SYSTEM_COMPILER_H_
37
38
39//*************************************************************************************************
40// Includes
41//*************************************************************************************************
42
44
45
46
47
48//=================================================================================================
49//
50// INTEL COMPILER MACRO DEFINITIONS
51//
52//=================================================================================================
53
54//*************************************************************************************************
56#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
57# define BLAZE_INTEL_COMPILER 1
58#else
59# define BLAZE_INTEL_COMPILER 0
60#endif
62//*************************************************************************************************
63
64
65
66
67//=================================================================================================
68//
69// CLANG COMPILER MACRO DEFINITIONS
70//
71//=================================================================================================
72
73//*************************************************************************************************
75#if defined(__clang__) && !BLAZE_INTEL_COMPILER
76# define BLAZE_CLANG_COMPILER 1
77#else
78# define BLAZE_CLANG_COMPILER 0
79#endif
81//*************************************************************************************************
82
83
84//*************************************************************************************************
86#define BLAZE_CLANG_MAJOR_VERSION __clang_major__
88//*************************************************************************************************
89
90
91//*************************************************************************************************
93#define BLAZE_CLANG_MINOR_VERSION __clang_minor__
95//*************************************************************************************************
96
97
98//*************************************************************************************************
100#define BLAZE_CLANG_PATCH_VERSION __clang_patchlevel__
102//*************************************************************************************************
103
104
105
106
107//=================================================================================================
108//
109// GNU COMPILER MACRO DEFINITIONS
110//
111//=================================================================================================
112
113//*************************************************************************************************
115#if defined(__GNUC__) && !BLAZE_CLANG_COMPILER && !BLAZE_INTEL_COMPILER
116# define BLAZE_GNU_COMPILER 1
117#else
118# define BLAZE_GNU_COMPILER 0
119#endif
121//*************************************************************************************************
122
123
124//*************************************************************************************************
126#define BLAZE_GNU_MAJOR_VERSION __GNUC__
128//*************************************************************************************************
129
130
131//*************************************************************************************************
133#define BLAZE_GNU_MINOR_VERSION __GNUC_MINOR__
135//*************************************************************************************************
136
137
138
139
140//=================================================================================================
141//
142// MICROSOFT COMPILER MACRO DEFINITIONS
143//
144//=================================================================================================
145
146//*************************************************************************************************
148#if defined(_MSC_VER) && !BLAZE_CLANG_COMPILER && !BLAZE_INTEL_COMPILER
149# define BLAZE_MSC_COMPILER 1
150#else
151# define BLAZE_MSC_COMPILER 0
152#endif
154//*************************************************************************************************
155
156
157
158
159//=================================================================================================
160//
161// COMPILE TIME CONSTRAINTS
162//
163//=================================================================================================
164
165//*************************************************************************************************
167namespace {
168
169BLAZE_STATIC_ASSERT( !BLAZE_GNU_COMPILER || ( !BLAZE_CLANG_COMPILER && !BLAZE_MSC_COMPILER && !BLAZE_INTEL_COMPILER ) );
170BLAZE_STATIC_ASSERT( !BLAZE_CLANG_COMPILER || ( !BLAZE_GNU_COMPILER && !BLAZE_MSC_COMPILER && !BLAZE_INTEL_COMPILER ) );
171BLAZE_STATIC_ASSERT( !BLAZE_MSC_COMPILER || ( !BLAZE_GNU_COMPILER && !BLAZE_CLANG_COMPILER && !BLAZE_INTEL_COMPILER ) );
172BLAZE_STATIC_ASSERT( !BLAZE_INTEL_COMPILER || ( !BLAZE_GNU_COMPILER && !BLAZE_CLANG_COMPILER && !BLAZE_MSC_COMPILER ) );
173
174}
176//*************************************************************************************************
177
178#endif
Compile time assertion.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.
Definition: StaticAssert.h:112