1 | // (C) Copyright John Maddock 2001. |
---|
2 | // (C) Copyright Peter Dimov 2001. |
---|
3 | // (C) Copyright Jens Maurer 2001. |
---|
4 | // (C) Copyright David Abrahams 2002 - 2003. |
---|
5 | // (C) Copyright Aleksey Gurtovoy 2002 - 2003. |
---|
6 | // (C) Copyright Guillaume Melquiond 2002 - 2003. |
---|
7 | // (C) Copyright Beman Dawes 2003. |
---|
8 | // (C) Copyright Martin Wille 2003. |
---|
9 | // Use, modification and distribution are subject to the |
---|
10 | // Boost Software License, Version 1.0. (See accompanying file |
---|
11 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
---|
12 | |
---|
13 | // See http://www.boost.org for most recent version. |
---|
14 | |
---|
15 | // Intel compiler setup: |
---|
16 | |
---|
17 | #include "boost/config/compiler/common_edg.hpp" |
---|
18 | |
---|
19 | #if defined(__INTEL_COMPILER) |
---|
20 | # define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER |
---|
21 | #elif defined(__ICL) |
---|
22 | # define BOOST_INTEL_CXX_VERSION __ICL |
---|
23 | #elif defined(__ICC) |
---|
24 | # define BOOST_INTEL_CXX_VERSION __ICC |
---|
25 | #elif defined(__ECC) |
---|
26 | # define BOOST_INTEL_CXX_VERSION __ECC |
---|
27 | #endif |
---|
28 | |
---|
29 | #define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION) |
---|
30 | #define BOOST_INTEL BOOST_INTEL_CXX_VERSION |
---|
31 | |
---|
32 | #if defined(_WIN32) || defined(_WIN64) |
---|
33 | # define BOOST_INTEL_WIN BOOST_INTEL |
---|
34 | #else |
---|
35 | # define BOOST_INTEL_LINUX BOOST_INTEL |
---|
36 | #endif |
---|
37 | |
---|
38 | #if (BOOST_INTEL_CXX_VERSION <= 500) && defined(_MSC_VER) |
---|
39 | # define BOOST_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS |
---|
40 | # define BOOST_NO_TEMPLATE_TEMPLATES |
---|
41 | #endif |
---|
42 | |
---|
43 | #if (BOOST_INTEL_CXX_VERSION <= 600) |
---|
44 | |
---|
45 | # if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov) |
---|
46 | |
---|
47 | // Boost libraries assume strong standard conformance unless otherwise |
---|
48 | // indicated by a config macro. As configured by Intel, the EDG front-end |
---|
49 | // requires certain compiler options be set to achieve that strong conformance. |
---|
50 | // Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt) |
---|
51 | // and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for |
---|
52 | // details as they apply to particular versions of the compiler. When the |
---|
53 | // compiler does not predefine a macro indicating if an option has been set, |
---|
54 | // this config file simply assumes the option has been set. |
---|
55 | // Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if |
---|
56 | // the compiler option is not enabled. |
---|
57 | |
---|
58 | # define BOOST_NO_SWPRINTF |
---|
59 | # endif |
---|
60 | |
---|
61 | // Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov) |
---|
62 | |
---|
63 | # if defined(_MSC_VER) && (_MSC_VER <= 1200) |
---|
64 | # define BOOST_NO_VOID_RETURNS |
---|
65 | # define BOOST_NO_INTEGRAL_INT64_T |
---|
66 | # endif |
---|
67 | |
---|
68 | #endif |
---|
69 | |
---|
70 | #if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32) |
---|
71 | # define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS |
---|
72 | #endif |
---|
73 | |
---|
74 | // See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864 |
---|
75 | #if BOOST_INTEL_CXX_VERSION < 600 |
---|
76 | # define BOOST_NO_INTRINSIC_WCHAR_T |
---|
77 | #else |
---|
78 | // We should test the macro _WCHAR_T_DEFINED to check if the compiler |
---|
79 | // supports wchar_t natively. *BUT* there is a problem here: the standard |
---|
80 | // headers define this macro if they typedef wchar_t. Anyway, we're lucky |
---|
81 | // because they define it without a value, while Intel C++ defines it |
---|
82 | // to 1. So we can check its value to see if the macro was defined natively |
---|
83 | // or not. |
---|
84 | // Under UNIX, the situation is exactly the same, but the macro _WCHAR_T |
---|
85 | // is used instead. |
---|
86 | # if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0) |
---|
87 | # define BOOST_NO_INTRINSIC_WCHAR_T |
---|
88 | # endif |
---|
89 | #endif |
---|
90 | |
---|
91 | #if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL) |
---|
92 | // |
---|
93 | // Figure out when Intel is emulating this gcc bug |
---|
94 | // (All Intel versions prior to 9.0.26, and versions |
---|
95 | // later than that if they are set up to emulate gcc 3.2 |
---|
96 | // or earlier): |
---|
97 | // |
---|
98 | # if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912) |
---|
99 | # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL |
---|
100 | # endif |
---|
101 | #endif |
---|
102 | |
---|
103 | // |
---|
104 | // Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T |
---|
105 | // set correctly, if we don't do this now, we will get errors later |
---|
106 | // in type_traits code among other things, getting this correct |
---|
107 | // for the Intel compiler is actually remarkably fragile and tricky: |
---|
108 | // |
---|
109 | #if defined(BOOST_NO_INTRINSIC_WCHAR_T) |
---|
110 | #include <cwchar> |
---|
111 | template< typename T > struct assert_no_intrinsic_wchar_t; |
---|
112 | template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; }; |
---|
113 | // if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T |
---|
114 | // where it is defined above: |
---|
115 | typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_; |
---|
116 | #else |
---|
117 | template< typename T > struct assert_intrinsic_wchar_t; |
---|
118 | template<> struct assert_intrinsic_wchar_t<wchar_t> {}; |
---|
119 | // if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line: |
---|
120 | template<> struct assert_intrinsic_wchar_t<unsigned short> {}; |
---|
121 | #endif |
---|
122 | |
---|
123 | #if _MSC_VER+0 >= 1000 |
---|
124 | # if _MSC_VER >= 1200 |
---|
125 | # define BOOST_HAS_MS_INT64 |
---|
126 | # endif |
---|
127 | # define BOOST_NO_SWPRINTF |
---|
128 | #elif defined(_WIN32) |
---|
129 | # define BOOST_DISABLE_WIN32 |
---|
130 | #endif |
---|
131 | |
---|
132 | // I checked version 6.0 build 020312Z, it implements the NRVO. |
---|
133 | // Correct this as you find out which version of the compiler |
---|
134 | // implemented the NRVO first. (Daniel Frey) |
---|
135 | #if (BOOST_INTEL_CXX_VERSION >= 600) |
---|
136 | # define BOOST_HAS_NRVO |
---|
137 | #endif |
---|
138 | |
---|
139 | // |
---|
140 | // versions check: |
---|
141 | // we don't support Intel prior to version 5.0: |
---|
142 | #if BOOST_INTEL_CXX_VERSION < 500 |
---|
143 | # error "Compiler not supported or configured - please reconfigure" |
---|
144 | #endif |
---|
145 | // |
---|
146 | // last known and checked version: |
---|
147 | #if (BOOST_INTEL_CXX_VERSION > 910) |
---|
148 | # if defined(BOOST_ASSERT_CONFIG) |
---|
149 | # error "Unknown compiler version - please run the configure tests and report the results" |
---|
150 | # elif defined(_MSC_VER) |
---|
151 | # pragma message("Unknown compiler version - please run the configure tests and report the results") |
---|
152 | # endif |
---|
153 | #endif |
---|
154 | |
---|
155 | |
---|
156 | |
---|
157 | |
---|
158 | |
---|