diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-06-02 18:32:58 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-06-03 06:38:51 (GMT) |
commit | 8d7b3ef5d42c07dffe1f84af14b0055d288e4376 (patch) | |
tree | 5b7a772ab56138a24ada6c3a103e5c37863be32b /Source/cmConfigure.cmake.h.in | |
parent | 0068224fdd7569f02dffe9fd8de2e6ce0c7abc28 (diff) | |
download | CMake-8d7b3ef5d42c07dffe1f84af14b0055d288e4376.zip CMake-8d7b3ef5d42c07dffe1f84af14b0055d288e4376.tar.gz CMake-8d7b3ef5d42c07dffe1f84af14b0055d288e4376.tar.bz2 |
Provide and use CM_FALLTHROUGH
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 |