intel.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. #ifndef BOOST_PREDEF_COMPILER_INTEL_H
  8. #define BOOST_PREDEF_COMPILER_INTEL_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_COMP_INTEL`
  13. http://en.wikipedia.org/wiki/Intel_C%2B%2B[Intel C/{CPP}] compiler.
  14. Version number available as major, minor, and patch.
  15. [options="header"]
  16. |===
  17. | {predef_symbol} | {predef_version}
  18. | `+__INTEL_COMPILER+` | {predef_detection}
  19. | `+__ICL+` | {predef_detection}
  20. | `+__ICC+` | {predef_detection}
  21. | `+__ECC+` | {predef_detection}
  22. | `+__INTEL_COMPILER+` | V.R
  23. | `+__INTEL_COMPILER+` and `+__INTEL_COMPILER_UPDATE+` | V.R.P
  24. |===
  25. */ // end::reference[]
  26. #define BOOST_COMP_INTEL BOOST_VERSION_NUMBER_NOT_AVAILABLE
  27. #if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \
  28. defined(__ECC)
  29. /* tag::reference[]
  30. NOTE: Because of an Intel mistake in the release version numbering when
  31. `__INTEL_COMPILER` is `9999` it is detected as version 12.1.0.
  32. */ // end::reference[]
  33. # if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 9999)
  34. # define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER(12,1,0)
  35. # endif
  36. # if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
  37. # define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER( \
  38. BOOST_VERSION_NUMBER_MAJOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
  39. BOOST_VERSION_NUMBER_MINOR(BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
  40. __INTEL_COMPILER_UPDATE)
  41. # endif
  42. # if !defined(BOOST_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER)
  43. # define BOOST_COMP_INTEL_DETECTION BOOST_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)
  44. # endif
  45. # if !defined(BOOST_COMP_INTEL_DETECTION)
  46. # define BOOST_COMP_INTEL_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
  47. # endif
  48. #endif
  49. #ifdef BOOST_COMP_INTEL_DETECTION
  50. # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
  51. # define BOOST_COMP_INTEL_EMULATED BOOST_COMP_INTEL_DETECTION
  52. # else
  53. # undef BOOST_COMP_INTEL
  54. # define BOOST_COMP_INTEL BOOST_COMP_INTEL_DETECTION
  55. # endif
  56. # define BOOST_COMP_INTEL_AVAILABLE
  57. # include <boost/predef/detail/comp_detected.h>
  58. #endif
  59. #define BOOST_COMP_INTEL_NAME "Intel C/C++"
  60. #endif
  61. #include <boost/predef/detail/test.h>
  62. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL,BOOST_COMP_INTEL_NAME)
  63. #ifdef BOOST_COMP_INTEL_EMULATED
  64. #include <boost/predef/detail/test.h>
  65. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_INTEL_EMULATED,BOOST_COMP_INTEL_NAME)
  66. #endif