summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/Configure.hxx.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-30 13:52:45 (GMT)
committerBrad King <brad.king@kitware.com>2017-11-30 13:52:45 (GMT)
commitd094b6796a3d9ee91a00f9541416e5d1e9304da8 (patch)
treedac0b837af24f4323e2ece9631d3fdc77ba74a55 /Source/kwsys/Configure.hxx.in
parenta3e029effd84dc185a9cc12e9b4efd48c70dffa6 (diff)
parent5fa414594eb4c1ca9e7041eb443d503ff495d90d (diff)
downloadCMake-d094b6796a3d9ee91a00f9541416e5d1e9304da8.zip
CMake-d094b6796a3d9ee91a00f9541416e5d1e9304da8.tar.gz
CMake-d094b6796a3d9ee91a00f9541416e5d1e9304da8.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys: KWSys 2017-11-30 (fa1ab7b8)
Diffstat (limited to 'Source/kwsys/Configure.hxx.in')
-rw-r--r--Source/kwsys/Configure.hxx.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/Source/kwsys/Configure.hxx.in b/Source/kwsys/Configure.hxx.in
index 1c07a4e..1e67874 100644
--- a/Source/kwsys/Configure.hxx.in
+++ b/Source/kwsys/Configure.hxx.in
@@ -12,6 +12,31 @@
#define @KWSYS_NAMESPACE@_CXX_HAS_EXT_STDIO_FILEBUF_H \
@KWSYS_CXX_HAS_EXT_STDIO_FILEBUF_H@
+#if defined(__SUNPRO_CC) && __SUNPRO_CC > 0x5130 && defined(__has_attribute)
+#define @KWSYS_NAMESPACE@__has_cpp_attribute(x) __has_attribute(x)
+#elif defined(__has_cpp_attribute)
+#define @KWSYS_NAMESPACE@__has_cpp_attribute(x) __has_cpp_attribute(x)
+#else
+#define @KWSYS_NAMESPACE@__has_cpp_attribute(x) 0
+#endif
+
+#ifndef @KWSYS_NAMESPACE@_FALLTHROUGH
+#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
+#endif
+#ifndef @KWSYS_NAMESPACE@_FALLTHROUGH
+#define @KWSYS_NAMESPACE@_FALLTHROUGH static_cast<void>(0)
+#endif
+
+#undef @KWSYS_NAMESPACE@__has_cpp_attribute
+
/* If building a C++ file in kwsys itself, give the source file
access to the macros without a configured namespace. */
#if defined(KWSYS_NAMESPACE)
@@ -22,6 +47,7 @@
#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
#endif
#endif