test.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*============================================================================
  2. Kitware Information Macro Library
  3. Copyright 2010-2011 Kitware, Inc.
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. extern int test_ABI_C(void);
  14. extern int test_INT_C(void);
  15. extern int test_ABI_CXX(void);
  16. extern int test_INT_CXX(void);
  17. extern int test_include_C(void);
  18. extern int test_include_CXX(void);
  19. #ifdef __cplusplus
  20. } // extern "C"
  21. #endif
  22. int main(void)
  23. {
  24. int result = 1;
  25. #ifdef KWIML_LANGUAGE_C
  26. result = test_ABI_C() && result;
  27. result = test_INT_C() && result;
  28. result = test_include_C() && result;
  29. #endif
  30. #ifdef KWIML_LANGUAGE_CXX
  31. result = test_ABI_CXX() && result;
  32. result = test_INT_CXX() && result;
  33. result = test_include_CXX() && result;
  34. #endif
  35. return result? 0 : 1;
  36. }