testConfigure.cxx 635 B

123456789101112131415161718192021222324252627282930
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing#kwsys for details. */
  3. #include "kwsysPrivate.h"
  4. #include KWSYS_HEADER(Configure.hxx)
  5. // Work-around CMake dependency scanning limitation. This must
  6. // duplicate the above list of headers.
  7. #if 0
  8. #include "Configure.hxx.in"
  9. #endif
  10. static bool testFallthrough(int n)
  11. {
  12. int r = 0;
  13. switch (n) {
  14. case 1:
  15. ++r;
  16. KWSYS_FALLTHROUGH;
  17. default:
  18. ++r;
  19. }
  20. return r == 2;
  21. }
  22. int testConfigure(int, char* [])
  23. {
  24. bool res = true;
  25. res = testFallthrough(1) && res;
  26. return res ? 0 : 1;
  27. }