mirror of
https://github.com/reactos/CMake.git
synced 2024-12-13 22:58:41 +00:00
5fa414594e
Code extracted from: https://gitlab.kitware.com/utils/kwsys.git at commit fa1ab7b8d790498359ab1b1bff522a7401a918fc (master). Upstream Shortlog ----------------- Brad King (1): 1b09cf0d Configure: Add KWSYS_FALLTHROUGH macro for C++ code
31 lines
635 B
C++
31 lines
635 B
C++
/* 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;
|
|
}
|