diff options
author | Brad King <brad.king@kitware.com> | 2017-06-05 13:43:47 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-06-05 13:43:51 (GMT) |
commit | 8a68a2ceb355621da21983c2571ead15d2b98dea (patch) | |
tree | 2b2f3f2df7816e46a3e949750889a5ab81a39778 /Source/cmConfigure.cmake.h.in | |
parent | 00639f2d5d41bb44f6ead5165b249bcd9e2b95b3 (diff) | |
parent | 8d7b3ef5d42c07dffe1f84af14b0055d288e4376 (diff) | |
download | CMake-8a68a2ceb355621da21983c2571ead15d2b98dea.zip CMake-8a68a2ceb355621da21983c2571ead15d2b98dea.tar.gz CMake-8a68a2ceb355621da21983c2571ead15d2b98dea.tar.bz2 |
Merge topic 'cm_fallthrough'
8d7b3ef5 Provide and use CM_FALLTHROUGH
0068224f C++ feature checks: check output for '[Ww]arning'
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !924
Diffstat (limited to 'Source/cmConfigure.cmake.h.in')
-rw-r--r-- | Source/cmConfigure.cmake.h.in | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in index 970fde5..524fdf8 100644 --- a/Source/cmConfigure.cmake.h.in +++ b/Source/cmConfigure.cmake.h.in @@ -22,6 +22,9 @@ #cmakedefine CMAKE_USE_LIBUV #cmakedefine CMake_HAVE_CXX_AUTO_PTR #cmakedefine CMake_HAVE_CXX_EQ_DELETE +#cmakedefine CMake_HAVE_CXX_FALLTHROUGH +#cmakedefine CMake_HAVE_CXX_GNU_FALLTHROUGH +#cmakedefine CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH #cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE #cmakedefine CMake_HAVE_CXX_NULLPTR #cmakedefine CMake_HAVE_CXX_OVERRIDE @@ -37,6 +40,16 @@ #define CM_EQ_DELETE #endif +#if defined(CMake_HAVE_CXX_FALLTHROUGH) +#define CM_FALLTHROUGH [[fallthrough]] +#elif defined(CMake_HAVE_CXX_GNU_FALLTHROUGH) +#define CM_FALLTHROUGH [[gnu::fallthrough]] +elif defined(CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH) +#define CM_FALLTHROUGH __attribute__((fallthrough)) +#else +#define CM_FALLTHROUGH +#endif + #ifdef CMake_HAVE_CXX_NULLPTR #define CM_NULLPTR nullptr #else |