metrowerks.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /*
  2. Copyright Redshift Software, Inc. 2008-2013
  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. # undef BOOST_COMP_MWERKS
  28. # if !defined(BOOST_COMP_MWERKS) && defined(__CWCC__)
  29. # define BOOST_COMP_MWERKS BOOST_PREDEF_MAKE_0X_VRPP(__CWCC__)
  30. # endif
  31. # if !defined(BOOST_COMP_MWERKS) && (__MWERKS__ >= 0x4200)
  32. # define BOOST_COMP_MWERKS BOOST_PREDEF_MAKE_0X_VRPP(__MWERKS__)
  33. # endif
  34. # if !defined(BOOST_COMP_MWERKS) && (__MWERKS__ >= 0x3204) // note the "skip": 04->9.3
  35. # define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER(9,(__MWERKS__)%100-1,0)
  36. # endif
  37. # if !defined(BOOST_COMP_MWERKS) && (__MWERKS__ >= 0x3200)
  38. # define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER(9,(__MWERKS__)%100,0)
  39. # endif
  40. # if !defined(BOOST_COMP_MWERKS) && (__MWERKS__ >= 0x3000)
  41. # define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER(8,(__MWERKS__)%100,0)
  42. # endif
  43. # if !defined(BOOST_COMP_MWERKS)
  44. # define BOOST_COMP_MWERKS BOOST_VERSION_NUMBER_AVAILABLE
  45. # endif
  46. #endif
  47. #if BOOST_COMP_MWERKS
  48. # define BOOST_COMP_MWERKS_AVAILABLE
  49. #endif
  50. #define BOOST_COMP_MWERKS_NAME "Metrowerks CodeWarrior"
  51. #include <boost/predef/detail/test.h>
  52. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_MWERKS,BOOST_COMP_MWERKS_NAME)
  53. #endif