InputFile.h.in 798 B

12345678910111213141516171819202122232425262728293031323334
  1. #include "includefile"
  2. /* This should be configured to a define. */
  3. #cmakedefine TEST_DEFINED @TEST_DEFINED@
  4. /* This should be configured to a commented undef with the curlies in place */
  5. #cmakedefine TEST_NOT_DEFINED ${TEST_NOT_DEFINED}
  6. int CheckMethod(const char* var, const char* val )
  7. {
  8. if ( !var )
  9. {
  10. printf("Var not specified\n");
  11. return 1;
  12. }
  13. if ( !val )
  14. {
  15. printf("Val not specified\n");
  16. return 1;
  17. }
  18. if ( strcmp(var, val) != 0)
  19. {
  20. printf("Var (%s) and Val (%s) are not the same...\n", var, val);
  21. return 1;
  22. }
  23. #if !defined(TEST_DEFINED) || TEST_DEFINED != 123
  24. printf("TEST_DEFINED is not defined to 123\n");
  25. return 1;
  26. #elif defined(TEST_NOT_DEFINED)
  27. printf("TEST_NOT_DEFINED is defined\n");
  28. return 1;
  29. #else
  30. return 0;
  31. #endif
  32. }