Configure.hxx 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
  3. #ifndef cmsys_Configure_hxx
  4. #define cmsys_Configure_hxx
  5. /* Include C configuration. */
  6. #include <cmsys/Configure.h>
  7. /* Whether wstring is available. */
  8. #define cmsys_STL_HAS_WSTRING 1
  9. /* Whether <ext/stdio_filebuf.h> is available. */
  10. #define cmsys_CXX_HAS_EXT_STDIO_FILEBUF_H \
  11. 1
  12. #if defined(__SUNPRO_CC) && __SUNPRO_CC > 0x5130 && defined(__has_attribute)
  13. #define cmsys__has_cpp_attribute(x) __has_attribute(x)
  14. #elif defined(__has_cpp_attribute)
  15. #define cmsys__has_cpp_attribute(x) __has_cpp_attribute(x)
  16. #else
  17. #define cmsys__has_cpp_attribute(x) 0
  18. #endif
  19. #if __cplusplus >= 201103L
  20. #define cmsys_NULLPTR nullptr
  21. #else
  22. #define cmsys_NULLPTR 0
  23. #endif
  24. #ifndef cmsys_FALLTHROUGH
  25. #if __cplusplus >= 201703L && cmsys__has_cpp_attribute(fallthrough)
  26. #define cmsys_FALLTHROUGH [[fallthrough]]
  27. #elif __cplusplus >= 201103L && \
  28. cmsys__has_cpp_attribute(gnu::fallthrough)
  29. #define cmsys_FALLTHROUGH [[gnu::fallthrough]]
  30. #elif __cplusplus >= 201103L && \
  31. cmsys__has_cpp_attribute(clang::fallthrough)
  32. #define cmsys_FALLTHROUGH [[clang::fallthrough]]
  33. #endif
  34. #endif
  35. #ifndef cmsys_FALLTHROUGH
  36. #define cmsys_FALLTHROUGH static_cast<void>(0)
  37. #endif
  38. #undef cmsys__has_cpp_attribute
  39. /* If building a C++ file in kwsys itself, give the source file
  40. access to the macros without a configured namespace. */
  41. #if defined(KWSYS_NAMESPACE)
  42. #if !cmsys_NAME_IS_KWSYS
  43. #define kwsys cmsys
  44. #endif
  45. #define KWSYS_NAME_IS_KWSYS cmsys_NAME_IS_KWSYS
  46. #define KWSYS_STL_HAS_WSTRING cmsys_STL_HAS_WSTRING
  47. #define KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H \
  48. cmsys_CXX_HAS_EXT_STDIO_FILEBUF_H
  49. #define KWSYS_FALLTHROUGH cmsys_FALLTHROUGH
  50. #define KWSYS_NULLPTR cmsys_NULLPTR
  51. #endif
  52. #endif