intel.h 2.6 KB

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