Configure.hxx.in 2.39 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.  */
3 4 5
#ifndef @KWSYS_NAMESPACE@_Configure_hxx
#define @KWSYS_NAMESPACE@_Configure_hxx

6 7 8
/* Include C configuration.  */
#include <@KWSYS_NAMESPACE@/Configure.h>

9 10
/* Whether wstring is available.  */
#define @KWSYS_NAMESPACE@_STL_HAS_WSTRING @KWSYS_STL_HAS_WSTRING@
Dāvis Mosāns's avatar
Dāvis Mosāns committed
11
/* Whether <ext/stdio_filebuf.h> is available. */
12 13
#define @KWSYS_NAMESPACE@_CXX_HAS_EXT_STDIO_FILEBUF_H                         \
  @KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@
14

15
#if defined(__SUNPRO_CC) && __SUNPRO_CC > 0x5130 && defined(__has_attribute)
16
#  define @KWSYS_NAMESPACE@__has_cpp_attribute(x) __has_attribute(x)
17
#elif defined(__has_cpp_attribute)
18
#  define @KWSYS_NAMESPACE@__has_cpp_attribute(x) __has_cpp_attribute(x)
19
#else
20
#  define @KWSYS_NAMESPACE@__has_cpp_attribute(x) 0
21 22
#endif

23
#if __cplusplus >= 201103L
24
#  define @KWSYS_NAMESPACE@_NULLPTR nullptr
25
#else
26
#  define @KWSYS_NAMESPACE@_NULLPTR 0
27 28
#endif

29
#ifndef @KWSYS_NAMESPACE@_FALLTHROUGH
30 31 32 33 34 35 36 37 38 39
#  if __cplusplus >= 201703L &&                                               \
    @KWSYS_NAMESPACE@__has_cpp_attribute(fallthrough)
#    define @KWSYS_NAMESPACE@_FALLTHROUGH [[fallthrough]]
#  elif __cplusplus >= 201103L &&                                             \
    @KWSYS_NAMESPACE@__has_cpp_attribute(gnu::fallthrough)
#    define @KWSYS_NAMESPACE@_FALLTHROUGH [[gnu::fallthrough]]
#  elif __cplusplus >= 201103L &&                                             \
    @KWSYS_NAMESPACE@__has_cpp_attribute(clang::fallthrough)
#    define @KWSYS_NAMESPACE@_FALLTHROUGH [[clang::fallthrough]]
#  endif
40 41
#endif
#ifndef @KWSYS_NAMESPACE@_FALLTHROUGH
42
#  define @KWSYS_NAMESPACE@_FALLTHROUGH static_cast<void>(0)
43 44 45 46
#endif

#undef @KWSYS_NAMESPACE@__has_cpp_attribute

47 48 49
/* If building a C++ file in kwsys itself, give the source file
   access to the macros without a configured namespace.  */
#if defined(KWSYS_NAMESPACE)
50 51 52 53 54 55 56 57 58
#  if !@KWSYS_NAMESPACE@_NAME_IS_KWSYS
#    define kwsys @KWSYS_NAMESPACE@
#  endif
#  define KWSYS_NAME_IS_KWSYS @KWSYS_NAMESPACE@_NAME_IS_KWSYS
#  define KWSYS_STL_HAS_WSTRING @KWSYS_NAMESPACE@_STL_HAS_WSTRING
#  define KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H                                   \
    @KWSYS_NAMESPACE@_CXX_HAS_EXT_STDIO_FILEBUF_H
#  define KWSYS_FALLTHROUGH @KWSYS_NAMESPACE@_FALLTHROUGH
#  define KWSYS_NULLPTR @KWSYS_NAMESPACE@_NULLPTR
59 60
#endif

61
#endif