summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testConfigure.cxx
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/testConfigure.cxx
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/testConfigure.cxx')
-rw-r--r--Source/kwsys/testConfigure.cxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/Source/kwsys/testConfigure.cxx b/Source/kwsys/testConfigure.cxx
new file mode 100644
index 0000000..916dcc1
--- /dev/null
+++ b/Source/kwsys/testConfigure.cxx
@@ -0,0 +1,30 @@
+/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
+#include "kwsysPrivate.h"
+#include KWSYS_HEADER(Configure.hxx)
+
+// Work-around CMake dependency scanning limitation. This must
+// duplicate the above list of headers.
+#if 0
+#include "Configure.hxx.in"
+#endif
+
+static bool testFallthrough(int n)
+{
+ int r = 0;
+ switch (n) {
+ case 1:
+ ++r;
+ KWSYS_FALLTHROUGH;
+ default:
+ ++r;
+ }
+ return r == 2;
+}
+
+int testConfigure(int, char* [])
+{
+ bool res = true;
+ res = testFallthrough(1) && res;
+ return res ? 0 : 1;
+}