ibm.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. Copyright Rene Rivera 2008-2015
  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_IBM_H
  8. #define BOOST_PREDEF_COMPILER_IBM_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_COMP_IBM`
  13. http://en.wikipedia.org/wiki/VisualAge[IBM XL C/{CPP}] compiler.
  14. Version number available as major, minor, and patch.
  15. [options="header"]
  16. |===
  17. | {predef_symbol} | {predef_version}
  18. | `+__IBMCPP__+` | {predef_detection}
  19. | `+__xlC__+` | {predef_detection}
  20. | `+__xlc__+` | {predef_detection}
  21. | `+__COMPILER_VER__+` | V.R.P
  22. | `+__xlC__+` | V.R.P
  23. | `+__xlc__+` | V.R.P
  24. | `+__IBMCPP__+` | V.R.P
  25. |===
  26. */ // end::reference[]
  27. #define BOOST_COMP_IBM BOOST_VERSION_NUMBER_NOT_AVAILABLE
  28. #if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__)
  29. # if !defined(BOOST_COMP_IBM_DETECTION) && defined(__COMPILER_VER__)
  30. # define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__)
  31. # endif
  32. # if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlC__)
  33. # define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlC__)
  34. # endif
  35. # if !defined(BOOST_COMP_IBM_DETECTION) && defined(__xlc__)
  36. # define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_0X_VVRR(__xlc__)
  37. # endif
  38. # if !defined(BOOST_COMP_IBM_DETECTION)
  39. # define BOOST_COMP_IBM_DETECTION BOOST_PREDEF_MAKE_10_VRP(__IBMCPP__)
  40. # endif
  41. #endif
  42. #ifdef BOOST_COMP_IBM_DETECTION
  43. # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
  44. # define BOOST_COMP_IBM_EMULATED BOOST_COMP_IBM_DETECTION
  45. # else
  46. # undef BOOST_COMP_IBM
  47. # define BOOST_COMP_IBM BOOST_COMP_IBM_DETECTION
  48. # endif
  49. # define BOOST_COMP_IBM_AVAILABLE
  50. # include <boost/predef/detail/comp_detected.h>
  51. #endif
  52. #define BOOST_COMP_IBM_NAME "IBM XL C/C++"
  53. #endif
  54. #include <boost/predef/detail/test.h>
  55. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM,BOOST_COMP_IBM_NAME)
  56. #ifdef BOOST_COMP_IBM_EMULATED
  57. #include <boost/predef/detail/test.h>
  58. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_IBM_EMULATED,BOOST_COMP_IBM_NAME)
  59. #endif