clang.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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_CLANG_H
  8. #define BOOST_PREDEF_COMPILER_CLANG_H
  9. #include <boost/predef/version_number.h>
  10. #include <boost/predef/make.h>
  11. /*`
  12. [heading `BOOST_COMP_CLANG`]
  13. [@http://en.wikipedia.org/wiki/Clang Clang] compiler.
  14. Version number available as major, minor, and patch.
  15. [table
  16. [[__predef_symbol__] [__predef_version__]]
  17. [[`__clang__`] [__predef_detection__]]
  18. [[`__clang_major__`, `__clang_minor__`, `__clang_patchlevel__`] [V.R.P]]
  19. ]
  20. */
  21. #define BOOST_COMP_CLANG BOOST_VERSION_NUMBER_NOT_AVAILABLE
  22. #if defined(__clang__)
  23. # define BOOST_COMP_CLANG_DETECTION BOOST_VERSION_NUMBER(__clang_major__,__clang_minor__,__clang_patchlevel__)
  24. #endif
  25. #ifdef BOOST_COMP_CLANG_DETECTION
  26. # if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
  27. # define BOOST_COMP_CLANG_EMULATED BOOST_COMP_CLANG_DETECTION
  28. # else
  29. # undef BOOST_COMP_CLANG
  30. # define BOOST_COMP_CLANG BOOST_COMP_CLANG_DETECTION
  31. # endif
  32. # define BOOST_COMP_CLANG_AVAILABLE
  33. # include <boost/predef/detail/comp_detected.h>
  34. #endif
  35. #define BOOST_COMP_CLANG_NAME "Clang"
  36. #endif
  37. #include <boost/predef/detail/test.h>
  38. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG,BOOST_COMP_CLANG_NAME)
  39. #ifdef BOOST_COMP_CLANG_EMULATED
  40. #include <boost/predef/detail/test.h>
  41. BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_CLANG_EMULATED,BOOST_COMP_CLANG_NAME)
  42. #endif