gcc.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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_GCC_H
  8. #define BOOST_PREDEF_COMPILER_GCC_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_COMP_GNUC`]
  13. [@http://en.wikipedia.org/wiki/GNU_Compiler_Collection Gnu GCC C/C++] compiler.
  14. Version number available as major, minor, and patch (if available).
  15. [table
  16. [[__predef_symbol__] [__predef_version__]]
  17. [[`__GNUC__`] [__predef_detection__]]
  18. [[`__GNUC__`, `__GNUC_MINOR__`, `__GNUC_PATCHLEVEL__`] [V.R.P]]
  19. [[`__GNUC__`, `__GNUC_MINOR__`] [V.R.0]]
  20. ]
  21. */
  22. #define BOOST_COMP_GNUC BOOST_VERSION_NUMBER_NOT_AVAILABLE
  23. #if defined(__GNUC__)
  24. # undef BOOST_COMP_GNUC
  25. # if !defined(BOOST_COMP_GNUC) && defined(__GNUC_PATCHLEVEL__)
  26. # define BOOST_COMP_GNUC \
  27. BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)
  28. # endif
  29. # if !defined(BOOST_COMP_GNUC)
  30. # define BOOST_COMP_GNUC \
  31. BOOST_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,0)
  32. # endif
  33. #endif
  34. #if BOOST_COMP_GNUC
  35. # define BOOST_COMP_GNUC_AVAILABLE
  36. #endif
  37. #define BOOST_COMP_GNUC_NAME "Gnu GCC C/C++"
  38. #include <boost/predef/detail/test.h>
  39. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_GNUC,BOOST_COMP_GNUC_NAME)
  40. #endif