Configure.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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_h
  4. #define cmsys_Configure_h
  5. /* If we are building a kwsys .c or .cxx file, let it use the kwsys
  6. namespace. When not building a kwsys source file these macros are
  7. temporarily defined inside the headers that use them. */
  8. #if defined(KWSYS_NAMESPACE)
  9. #define kwsys_ns(x) cmsys##x
  10. #define kwsysEXPORT cmsys_EXPORT
  11. #endif
  12. /* Disable some warnings inside kwsys source files. */
  13. #if defined(KWSYS_NAMESPACE)
  14. #if defined(__BORLANDC__)
  15. #pragma warn - 8027 /* function not inlined. */
  16. #endif
  17. #if defined(__INTEL_COMPILER)
  18. #pragma warning(disable : 1572) /* floating-point equality test */
  19. #endif
  20. #if defined(__sgi) && !defined(__GNUC__)
  21. #pragma set woff 3970 /* pointer to int conversion */
  22. #pragma set woff 3968 /* 64 bit conversion */
  23. #endif
  24. #endif
  25. /* Whether kwsys namespace is "kwsys". */
  26. #define cmsys_NAME_IS_KWSYS 0
  27. /* Whether Large File Support is requested. */
  28. #define cmsys_LFS_REQUESTED 1
  29. /* Whether Large File Support is available. */
  30. #if cmsys_LFS_REQUESTED
  31. #define cmsys_LFS_AVAILABLE 1
  32. #endif
  33. /* Setup Large File Support if requested. */
  34. #if cmsys_LFS_REQUESTED
  35. /* Since LFS is requested this header must be included before system
  36. headers whether or not LFS is available. */
  37. #if 0 && (defined(_SYS_TYPES_H) || defined(_SYS_TYPES_INCLUDED))
  38. #error "cmsys/Configure.h must be included before sys/types.h"
  39. #endif
  40. /* Enable the large file API if it is available. */
  41. #if cmsys_LFS_AVAILABLE && \
  42. !defined(cmsys_LFS_NO_DEFINES)
  43. #if !defined(_LARGEFILE_SOURCE) && \
  44. !defined(cmsys_LFS_NO_DEFINE_LARGEFILE_SOURCE)
  45. #define _LARGEFILE_SOURCE
  46. #endif
  47. #if !defined(_LARGEFILE64_SOURCE) && \
  48. !defined(cmsys_LFS_NO_DEFINE_LARGEFILE64_SOURCE)
  49. #define _LARGEFILE64_SOURCE
  50. #endif
  51. #if !defined(_LARGE_FILES) && \
  52. !defined(cmsys_LFS_NO_DEFINE_LARGE_FILES)
  53. #define _LARGE_FILES
  54. #endif
  55. #if !defined(_FILE_OFFSET_BITS) && \
  56. !defined(cmsys_LFS_NO_DEFINE_FILE_OFFSET_BITS)
  57. #define _FILE_OFFSET_BITS 64
  58. #endif
  59. #endif
  60. #endif
  61. /* Setup the export macro. */
  62. #if 0
  63. #if defined(_WIN32) || defined(__CYGWIN__)
  64. #if defined(cmsys_EXPORTS)
  65. #define cmsys_EXPORT __declspec(dllexport)
  66. #else
  67. #define cmsys_EXPORT __declspec(dllimport)
  68. #endif
  69. #elif __GNUC__ >= 4
  70. #define cmsys_EXPORT __attribute__((visibility("default")))
  71. #else
  72. #define cmsys_EXPORT
  73. #endif
  74. #else
  75. #define cmsys_EXPORT
  76. #endif
  77. /* Enable warnings that are off by default but are useful. */
  78. #if !defined(cmsys_NO_WARNING_ENABLE)
  79. #if defined(_MSC_VER)
  80. #pragma warning(default : 4263) /* no override, call convention differs */
  81. #endif
  82. #endif
  83. /* Disable warnings that are on by default but occur in valid code. */
  84. #if !defined(cmsys_NO_WARNING_DISABLE)
  85. #if defined(_MSC_VER)
  86. #pragma warning(disable : 4097) /* typedef is synonym for class */
  87. #pragma warning(disable : 4127) /* conditional expression is constant */
  88. #pragma warning(disable : 4244) /* possible loss in conversion */
  89. #pragma warning(disable : 4251) /* missing DLL-interface */
  90. #pragma warning(disable : 4305) /* truncation from type1 to type2 */
  91. #pragma warning(disable : 4309) /* truncation of constant value */
  92. #pragma warning(disable : 4514) /* unreferenced inline function */
  93. #pragma warning(disable : 4706) /* assignment in conditional expression */
  94. #pragma warning(disable : 4710) /* function not inlined */
  95. #pragma warning(disable : 4786) /* identifier truncated in debug info */
  96. #endif
  97. #if defined(__BORLANDC__) && !defined(__cplusplus)
  98. /* Code has no effect; raised by winnt.h in C (not C++) when ignoring an
  99. unused parameter using "(param)" syntax (i.e. no cast to void). */
  100. #pragma warn - 8019
  101. #endif
  102. #endif
  103. /* MSVC 6.0 in release mode will warn about code it produces with its
  104. optimizer. Disable the warnings specifically for this
  105. configuration. Real warnings will be revealed by a debug build or
  106. by other compilers. */
  107. #if !defined(cmsys_NO_WARNING_DISABLE_BOGUS)
  108. #if defined(_MSC_VER) && (_MSC_VER < 1300) && defined(NDEBUG)
  109. #pragma warning(disable : 4701) /* Variable may be used uninitialized. */
  110. #pragma warning(disable : 4702) /* Unreachable code. */
  111. #endif
  112. #endif
  113. #endif