Configure.h.in 4.99 KB
Newer Older
1 2
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
   file Copyright.txt or https://cmake.org/licensing#kwsys for details.  */
Brad King's avatar
Brad King committed
3 4 5
#ifndef @KWSYS_NAMESPACE@_Configure_h
#define @KWSYS_NAMESPACE@_Configure_h

6 7 8 9
/* If we are building a kwsys .c or .cxx file, let it use the kwsys
   namespace.  When not building a kwsys source file these macros are
   temporarily defined inside the headers that use them.  */
#if defined(KWSYS_NAMESPACE)
10 11
#  define kwsys_ns(x) @KWSYS_NAMESPACE@##x
#  define kwsysEXPORT @KWSYS_NAMESPACE@_EXPORT
12 13
#endif

14 15
/* Disable some warnings inside kwsys source files.  */
#if defined(KWSYS_NAMESPACE)
16 17 18 19 20 21 22 23 24 25
#  if defined(__BORLANDC__)
#    pragma warn - 8027 /* function not inlined.  */
#  endif
#  if defined(__INTEL_COMPILER)
#    pragma warning(disable : 1572) /* floating-point equality test */
#  endif
#  if defined(__sgi) && !defined(__GNUC__)
#    pragma set woff 3970 /* pointer to int conversion */
#    pragma set woff 3968 /* 64 bit conversion */
#  endif
26 27
#endif

28 29 30
/* Whether kwsys namespace is "kwsys".  */
#define @KWSYS_NAMESPACE@_NAME_IS_KWSYS @KWSYS_NAME_IS_KWSYS@

31 32 33 34 35
/* Whether Large File Support is requested.  */
#define @KWSYS_NAMESPACE@_LFS_REQUESTED @KWSYS_LFS_REQUESTED@

/* Whether Large File Support is available.  */
#if @KWSYS_NAMESPACE@_LFS_REQUESTED
36
#  define @KWSYS_NAMESPACE@_LFS_AVAILABLE @KWSYS_LFS_AVAILABLE@
37 38 39 40
#endif

/* Setup Large File Support if requested.  */
#if @KWSYS_NAMESPACE@_LFS_REQUESTED
41 42
/* Since LFS is requested this header must be included before system
   headers whether or not LFS is available. */
43 44 45
#  if 0 && (defined(_SYS_TYPES_H) || defined(_SYS_TYPES_INCLUDED))
#    error "@KWSYS_NAMESPACE@/Configure.h must be included before sys/types.h"
#  endif
46
/* Enable the large file API if it is available.  */
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
#  if @KWSYS_NAMESPACE@_LFS_AVAILABLE &&                                      \
    !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINES)
#    if !defined(_LARGEFILE_SOURCE) &&                                        \
      !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE_SOURCE)
#      define _LARGEFILE_SOURCE
#    endif
#    if !defined(_LARGEFILE64_SOURCE) &&                                      \
      !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGEFILE64_SOURCE)
#      define _LARGEFILE64_SOURCE
#    endif
#    if !defined(_LARGE_FILES) &&                                             \
      !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_LARGE_FILES)
#      define _LARGE_FILES
#    endif
#    if !defined(_FILE_OFFSET_BITS) &&                                        \
      !defined(@KWSYS_NAMESPACE@_LFS_NO_DEFINE_FILE_OFFSET_BITS)
#      define _FILE_OFFSET_BITS 64
#    endif
#  endif
66 67
#endif

Brad King's avatar
Brad King committed
68
/* Setup the export macro.  */
69
#if @KWSYS_BUILD_SHARED@
70 71 72 73 74 75 76 77 78 79 80
#  if defined(_WIN32) || defined(__CYGWIN__)
#    if defined(@KWSYS_NAMESPACE@_EXPORTS)
#      define @KWSYS_NAMESPACE@_EXPORT __declspec(dllexport)
#    else
#      define @KWSYS_NAMESPACE@_EXPORT __declspec(dllimport)
#    endif
#  elif __GNUC__ >= 4
#    define @KWSYS_NAMESPACE@_EXPORT __attribute__((visibility("default")))
#  else
#    define @KWSYS_NAMESPACE@_EXPORT
#  endif
81
#else
82
#  define @KWSYS_NAMESPACE@_EXPORT
Brad King's avatar
Brad King committed
83 84
#endif

Brad King's avatar
Brad King committed
85 86
/* Enable warnings that are off by default but are useful.  */
#if !defined(@KWSYS_NAMESPACE@_NO_WARNING_ENABLE)
87 88 89 90
#  if defined(_MSC_VER)
#    pragma warning(default : 4263) /* no override, call convention differs   \
                                     */
#  endif
Brad King's avatar
Brad King committed
91 92 93
#endif

/* Disable warnings that are on by default but occur in valid code.  */
Brad King's avatar
Brad King committed
94
#if !defined(@KWSYS_NAMESPACE@_NO_WARNING_DISABLE)
95 96 97 98 99 100 101 102 103 104 105 106 107 108
#  if defined(_MSC_VER)
#    pragma warning(disable : 4097) /* typedef is synonym for class */
#    pragma warning(disable : 4127) /* conditional expression is constant */
#    pragma warning(disable : 4244) /* possible loss in conversion */
#    pragma warning(disable : 4251) /* missing DLL-interface */
#    pragma warning(disable : 4305) /* truncation from type1 to type2 */
#    pragma warning(disable : 4309) /* truncation of constant value */
#    pragma warning(disable : 4514) /* unreferenced inline function */
#    pragma warning(disable : 4706) /* assignment in conditional expression   \
                                     */
#    pragma warning(disable : 4710) /* function not inlined */
#    pragma warning(disable : 4786) /* identifier truncated in debug info */
#  endif
#  if defined(__BORLANDC__) && !defined(__cplusplus)
109 110
/* Code has no effect; raised by winnt.h in C (not C++) when ignoring an
   unused parameter using "(param)" syntax (i.e. no cast to void).  */
111 112
#    pragma warn - 8019
#  endif
Brad King's avatar
Brad King committed
113 114 115 116 117 118 119
#endif

/* MSVC 6.0 in release mode will warn about code it produces with its
   optimizer.  Disable the warnings specifically for this
   configuration.  Real warnings will be revealed by a debug build or
   by other compilers.  */
#if !defined(@KWSYS_NAMESPACE@_NO_WARNING_DISABLE_BOGUS)
120 121 122 123
#  if defined(_MSC_VER) && (_MSC_VER < 1300) && defined(NDEBUG)
#    pragma warning(disable : 4701) /* Variable may be used uninitialized. */
#    pragma warning(disable : 4702) /* Unreachable code.  */
#  endif
Brad King's avatar
Brad King committed
124 125
#endif

Brad King's avatar
Brad King committed
126
#endif