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 // COMPILER MACRO DEFINITIONS
51 //
52 //=================================================================================================
53 
54 //*************************************************************************************************
56 #if defined(__GNUC__) && !defined(__clang__)
57 # define BLAZE_GNU_COMPILER 1
58 #else
59 # define BLAZE_GNU_COMPILER 0
60 #endif
61 
62 //*************************************************************************************************
63 
64 
65 //*************************************************************************************************
67 #if defined(__clang__)
68 # define BLAZE_CLANG_COMPILER 1
69 #else
70 # define BLAZE_CLANG_COMPILER 0
71 #endif
72 
73 //*************************************************************************************************
74 
75 
76 //*************************************************************************************************
78 #if defined(_MSC_VER) && !defined(__clang__)
79 # define BLAZE_MSC_COMPILER 1
80 #else
81 # define BLAZE_MSC_COMPILER 0
82 #endif
83 
84 //*************************************************************************************************
85 
86 
87 //*************************************************************************************************
89 #if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
90 # define BLAZE_INTEL_COMPILER 1
91 #else
92 # define BLAZE_INTEL_COMPILER 0
93 #endif
94 
95 //*************************************************************************************************
96 
97 
98 
99 
100 //=================================================================================================
101 //
102 // COMPILE TIME CONSTRAINTS
103 //
104 //=================================================================================================
105 
106 //*************************************************************************************************
108 namespace {
109 
110 BLAZE_STATIC_ASSERT( !BLAZE_GNU_COMPILER || ( !BLAZE_CLANG_COMPILER && !BLAZE_MSC_COMPILER && !BLAZE_INTEL_COMPILER ) );
111 BLAZE_STATIC_ASSERT( !BLAZE_CLANG_COMPILER || ( !BLAZE_GNU_COMPILER && !BLAZE_MSC_COMPILER && !BLAZE_INTEL_COMPILER ) );
112 BLAZE_STATIC_ASSERT( !BLAZE_MSC_COMPILER || ( !BLAZE_GNU_COMPILER && !BLAZE_CLANG_COMPILER && !BLAZE_INTEL_COMPILER ) );
113 BLAZE_STATIC_ASSERT( !BLAZE_INTEL_COMPILER || ( !BLAZE_GNU_COMPILER && !BLAZE_CLANG_COMPILER && !BLAZE_MSC_COMPILER ) );
114 
115 }
117 //*************************************************************************************************
118 
119 #endif
Compile time assertion.
#define BLAZE_STATIC_ASSERT(expr)
Compile time assertion macro.In case of an invalid compile time expression, a compilation error is cr...
Definition: StaticAssert.h:112