main.cpp 819 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef BOOL_PROP1
  2. #error Expected BOOL_PROP1
  3. #endif
  4. #ifndef BOOL_PROP2
  5. #error Expected BOOL_PROP2
  6. #endif
  7. #ifndef BOOL_PROP3
  8. #error Expected BOOL_PROP3
  9. #endif
  10. #ifndef STRING_PROP1
  11. #error Expected STRING_PROP1
  12. #endif
  13. #ifndef STRING_PROP2
  14. #error Expected STRING_PROP2
  15. #endif
  16. #ifndef STRING_PROP3
  17. #error Expected STRING_PROP3
  18. #endif
  19. template<bool test>
  20. struct CMakeStaticAssert;
  21. template<>
  22. struct CMakeStaticAssert<true> {};
  23. enum {
  24. NumericMaxTest1 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP1 == 100>),
  25. NumericMaxTest2 = sizeof(CMakeStaticAssert<NUMBER_MAX_PROP2 == 250>),
  26. NumericMinTest1 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP1 == 50>),
  27. NumericMinTest2 = sizeof(CMakeStaticAssert<NUMBER_MIN_PROP2 == 200>)
  28. };
  29. #include "iface2.h"
  30. int main(int argc, char **argv)
  31. {
  32. Iface2 if2;
  33. return if2.foo();
  34. }