metrowerks.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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_METROWERKS_H
  8. #define BOOST_PREDEF_COMPILER_METROWERKS_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /* tag::reference[]
  12. = `BOOST_COMP_MWERKS`
  13. http://en.wikipedia.org/wiki/CodeWarrior[Metrowerks CodeWarrior] compiler.
  14. Version number available as major, minor, and patch.
  15. [options="header"]
  16. |===
  17. | {predef_symbol} | {predef_version}
  18. | `+__MWERKS__+` | {predef_detection}
  19. | `+__CWCC__+` | {predef_detection}
  20. | `+__CWCC__+` | V.R.P
  21. | `+__MWERKS__+` | V.R.P >= 4.2.0
  22. | `+__MWERKS__+` | 9.R.0
  23. | `+__MWERKS__+` | 8.R.0
  24. |===
  25. */ // end::reference[]
  26. #define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER_NOT_AVAILABLE
  27. #if defined(__MWERKS__) || defined(__CWCC__)
  28. # if !defined(BOOST_COMP_MWERKS_DETECTION) && defined(__CWCC__)
  29. # define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__CWCC__)
  30. # endif
  31. # if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x4200)
  32. # define BOOST_COMP_MWERKS_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__MWERKS__)
  33. # endif
  34. # if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3204) // note the "skip": 04->9.3
  35. # define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100-1,0)
  36. # endif
  37. # if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3200)
  38. # define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(9,(__MWERKS__)%100,0)
  39. # endif
  40. # if !defined(BOOST_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3000)
  41. # define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER(8,(__MWERKS__)%100,0)
  42. # endif
  43. # if !defined(BOOST_COMP_MWERKS_DETECTION)
  44. # define BOOST_COMP_MWERKS_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
  45. # endif
  46. #endif
  47. #ifdef BOOST_COMP_MWERKS_DETECTION
  48. # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
  49. # define BOOST_COMP_MWERKS_EMULATED BOOST_COMP_MWERKS_DETECTION
  50. # else
  51. # undef BOOST_COMP_MWERKS
  52. # define BOOST_COMP_MWERKS BOOST_COMP_MWERKS_DETECTION
  53. # endif
  54. # define BOOST_COMP_MWERKS_AVAILABLE
  55. # include <boost/predef/detail/comp_detected.h>
  56. #endif
  57. #define BOOST_COMP_MWERKS_NAME "Metrowerks CodeWarrior"
  58. #endif
  59. #include <boost/predef/detail/test.h>
  60. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS,BOOST_COMP_MWERKS_NAME)
  61. #ifdef BOOST_COMP_MWERKS_EMULATED
  62. #include <boost/predef/detail/test.h>
  63. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS_EMULATED,BOOST_COMP_MWERKS_NAME)
  64. #endif