InputFile.h.in 941 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. /* This complicated line should be configured unchanged: */
  7. static const char* configvar =
  8. "@$@$junk =~ s/#$xyz#/$foo_bar{$wibble}->{$xyz}/;@@";
  9. int CheckMethod(const char* var, const char* val )
  10. {
  11. if ( !var )
  12. {
  13. printf("Var not specified\n");
  14. return 1;
  15. }
  16. if ( !val )
  17. {
  18. printf("Val not specified\n");
  19. return 1;
  20. }
  21. if ( strcmp(var, val) != 0)
  22. {
  23. printf("Var (%s) and Val (%s) are not the same...\n", var, val);
  24. return 1;
  25. }
  26. #if !defined(TEST_DEFINED) || TEST_DEFINED != 123
  27. printf("TEST_DEFINED is not defined to 123\n");
  28. return 1;
  29. #elif defined(TEST_NOT_DEFINED)
  30. printf("TEST_NOT_DEFINED is defined\n");
  31. return 1;
  32. #else
  33. return 0;
  34. #endif
  35. }