VirtualBox

source: vbox/trunk/src/libs/boost-1.37.0/boost/config/compiler/intel.hpp@ 35818

最後變更 在這個檔案從35818是 16204,由 vboxsync 提交於 16 年 前

export the boost stuff required for Main

檔案大小: 6.1 KB
 
1// (C) Copyright John Maddock 2001-8.
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#if (defined(__GNUC__) && (__GNUC__ < 4)) || defined(_WIN32)
103// GCC or VC emulation:
104#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
105#endif
106//
107// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
108// set correctly, if we don't do this now, we will get errors later
109// in type_traits code among other things, getting this correct
110// for the Intel compiler is actually remarkably fragile and tricky:
111//
112#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
113#include <cwchar>
114template< typename T > struct assert_no_intrinsic_wchar_t;
115template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
116// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
117// where it is defined above:
118typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
119#else
120template< typename T > struct assert_intrinsic_wchar_t;
121template<> struct assert_intrinsic_wchar_t<wchar_t> {};
122// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
123template<> struct assert_intrinsic_wchar_t<unsigned short> {};
124#endif
125
126#if _MSC_VER+0 >= 1000
127# if _MSC_VER >= 1200
128# define BOOST_HAS_MS_INT64
129# endif
130# define BOOST_NO_SWPRINTF
131# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
132#elif defined(_WIN32)
133# define BOOST_DISABLE_WIN32
134#endif
135
136// I checked version 6.0 build 020312Z, it implements the NRVO.
137// Correct this as you find out which version of the compiler
138// implemented the NRVO first. (Daniel Frey)
139#if (BOOST_INTEL_CXX_VERSION >= 600)
140# define BOOST_HAS_NRVO
141#endif
142
143//
144// versions check:
145// we don't support Intel prior to version 5.0:
146#if BOOST_INTEL_CXX_VERSION < 500
147# error "Compiler not supported or configured - please reconfigure"
148#endif
149
150// Intel on MacOS requires
151#if defined(__APPLE__) && defined(__INTEL_COMPILER)
152# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
153#endif
154
155// Intel on Altix Itanium
156#if defined(__itanium__) && defined(__INTEL_COMPILER)
157# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
158#endif
159
160//
161// last known and checked version:
162#if (BOOST_INTEL_CXX_VERSION > 1010)
163# if defined(BOOST_ASSERT_CONFIG)
164# error "Unknown compiler version - please run the configure tests and report the results"
165# elif defined(_MSC_VER)
166//
167// We don't emit this warning any more, since we have so few
168// defect macros set anyway (just the one).
169//
170//# pragma message("Unknown compiler version - please run the configure tests and report the results")
171# endif
172#endif
173
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette