1 | /* |
2 | Copyright Rene Rivera 2008-2017 |
3 | Distributed under the Boost Software License, Version 1.0. |
4 | (See accompanying file LICENSE_1_0.txt or copy at |
5 | http://www.boost.org/LICENSE_1_0.txt) |
6 | */ |
7 | |
8 | #ifndef BOOST_PREDEF_COMPILER_INTEL_H |
9 | #define BOOST_PREDEF_COMPILER_INTEL_H |
10 | |
11 | #include <boost/predef/version_number.h> |
12 | #include <boost/predef/make.h> |
13 | |
14 | /* tag::reference[] |
15 | = `BOOST_COMP_INTEL` |
16 | |
17 | http://en.wikipedia.org/wiki/Intel_C%2B%2B[Intel C/{CPP}] compiler. |
18 | Version number available as major, minor, and patch. |
19 | |
20 | [options="header"] |
21 | |=== |
22 | | {predef_symbol} | {predef_version} |
23 | |
24 | | `+__INTEL_COMPILER+` | {predef_detection} |
25 | | `+__ICL+` | {predef_detection} |
26 | | `+__ICC+` | {predef_detection} |
27 | | `+__ECC+` | {predef_detection} |
28 | |
29 | | `+__INTEL_COMPILER+` | V.R |
30 | | `+__INTEL_COMPILER+` and `+__INTEL_COMPILER_UPDATE+` | V.R.P |
31 | |=== |
32 | */ // end::reference[] |
33 | |
34 | #define BOOST_COMP_INTEL BOOST_VERSION_NUMBER_NOT_AVAILABLE |
35 | |
36 | #if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \ |
37 | defined(__ECC) |
38 | /* tag::reference[] |
39 | NOTE: Because of an Intel mistake in the release version numbering when |
40 | `__INTEL_COMPILER` is `9999` it is detected as version 12.1.0. |
41 | */ // end::reference[] |
42 | # if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 9999) |
43 | # define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER(12,1,0) |
44 | # endif |
45 | # if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE) |
46 | # define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER( \ |
47 | BOOST_VERSION_NUMBER_MAJOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \ |
48 | BOOST_VERSION_NUMBER_MINOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \ |
49 | __INTEL_COMPILER_UPDATE) |
50 | # endif |
51 | # if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) |
52 | # define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER) |
53 | # endif |
54 | # if !defined(BOOST_COMP_INTEL_DETECTION) |
55 | # define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE |
56 | # endif |
57 | #endif |
58 | |
59 | #ifdef BOOST_COMP_INTEL_DETECTION |
60 | # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED) |
61 | # define BOOST_COMP_INTEL_EMULATED BOOST_COMP_INTEL_DETECTION |
62 | # else |
63 | # undef BOOST_COMP_INTEL |
64 | # define BOOST_COMP_INTEL BOOST_COMP_INTEL_DETECTION |
65 | # endif |
66 | # define BOOST_COMP_INTEL_AVAILABLE |
67 | # include <boost/predef/detail/comp_detected.h> |
68 | #endif |
69 | |
70 | #define BOOST_COMP_INTEL_NAME "Intel C/C++" |
71 | |
72 | #endif |
73 | |
74 | #include <boost/predef/detail/test.h> |
75 | BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL,BOOST_COMP_INTEL_NAME) |
76 | |
77 | #ifdef BOOST_COMP_INTEL_EMULATED |
78 | #include <boost/predef/detail/test.h> |
79 | BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL_EMULATED,BOOST_COMP_INTEL_NAME) |
80 | #endif |
81 | |