metrowerks.h 2.5 KB

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