summaryrefslogtreecommitdiff
path: root/Source/cmConfigure.cmake.h.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-30 08:58:01 -0500
committerBrad King <brad.king@kitware.com>2017-11-30 09:50:39 -0500
commitb2f612a0fabfb87e79b60f440c05a2cecde424f0 (patch)
treeac6526de6f5a6aa2d1dcf679178fd29abb184929 /Source/cmConfigure.cmake.h.in
parentd094b6796a3d9ee91a00f9541416e5d1e9304da8 (diff)
downloadcmake-b2f612a0fabfb87e79b60f440c05a2cecde424f0.tar.gz
Simplify CM_FALLTHROUGH implementation
Use the macro now provided by KWSys instead of using `try_compile` checks. It will no longer consider the `__attribute__((fallthrough))` variant, but compilers that don't have one of the modern attributes shouldn't warn about not using one anyway.
Diffstat (limited to 'Source/cmConfigure.cmake.h.in')
-rw-r--r--Source/cmConfigure.cmake.h.in13
1 files changed, 1 insertions, 12 deletions
diff --git a/Source/cmConfigure.cmake.h.in b/Source/cmConfigure.cmake.h.in
index 9a78aca36b..c80439b135 100644
--- a/Source/cmConfigure.cmake.h.in
+++ b/Source/cmConfigure.cmake.h.in
@@ -19,22 +19,11 @@
#cmakedefine HAVE_UNSETENV
#cmakedefine CMAKE_USE_ELF_PARSER
#cmakedefine CMAKE_USE_MACH_PARSER
-#cmakedefine CMake_HAVE_CXX_FALLTHROUGH
-#cmakedefine CMake_HAVE_CXX_GNU_FALLTHROUGH
-#cmakedefine CMake_HAVE_CXX_ATTRIBUTE_FALLTHROUGH
#cmakedefine CMake_HAVE_CXX_MAKE_UNIQUE
#define CMAKE_BIN_DIR "/@CMAKE_BIN_DIR@"
#define CMAKE_DATA_DIR "/@CMAKE_DATA_DIR@"
-#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
+#define CM_FALLTHROUGH cmsys_FALLTHROUGH
#define CM_DISABLE_COPY(Class) \
Class(Class const&) = delete; \