summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/testConfigure.cxx
blob: 4a34e1cbc79a3cb9d1221d0565fc3578ecbc20a4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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;
}