source: NonGTP/Boost/boost/config/compiler/intel.hpp @ 857

Revision 857, 5.5 KB checked in by igarcia, 18 years ago (diff)
Line 
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//
95#  if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL <= 900)
96#     define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
97#  endif
98#endif
99
100//
101// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
102// set correctly, if we don't do this now, we will get errors later
103// in type_traits code among other things, getting this correct
104// for the Intel compiler is actually remarkably fragile and tricky:
105//
106#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
107#include <cwchar>
108template< typename T > struct assert_no_intrinsic_wchar_t;
109template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
110// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
111// where it is defined above:
112typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
113#else
114template< typename T > struct assert_intrinsic_wchar_t;
115template<> struct assert_intrinsic_wchar_t<wchar_t> {};
116// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
117template<> struct assert_intrinsic_wchar_t<unsigned short> {};
118#endif
119
120#if _MSC_VER+0 >= 1000
121#  if _MSC_VER >= 1200
122#     define BOOST_HAS_MS_INT64
123#  endif
124#  define BOOST_NO_SWPRINTF
125#elif defined(_WIN32)
126#  define BOOST_DISABLE_WIN32
127#endif
128
129// I checked version 6.0 build 020312Z, it implements the NRVO.
130// Correct this as you find out which version of the compiler
131// implemented the NRVO first.  (Daniel Frey)
132#if (BOOST_INTEL_CXX_VERSION >= 600)
133#  define BOOST_HAS_NRVO
134#endif
135
136//
137// versions check:
138// we don't support Intel prior to version 5.0:
139#if BOOST_INTEL_CXX_VERSION < 500
140#  error "Compiler not supported or configured - please reconfigure"
141#endif
142//
143// last known and checked version:
144#if (BOOST_INTEL_CXX_VERSION > 900)
145#  if defined(BOOST_ASSERT_CONFIG)
146#     error "Unknown compiler version - please run the configure tests and report the results"
147#  elif defined(_MSC_VER)
148#     pragma message("Unknown compiler version - please run the configure tests and report the results")
149#  endif
150#endif
151
152
153
154
155
Note: See TracBrowser for help on using the repository browser.