Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Tests / CustomCommand / generator.cxx
blobcceac073a39121d66c45aecceb83f0a708210029
1 #include <stdio.h>
3 int main(int argc, char *argv[])
5 if ( argc < 2 )
7 fprintf(stderr, "Usage: %s <file>\n", argv[0]);
8 return 1;
10 FILE *fp = fopen(argv[1],"w");
11 #ifdef GENERATOR_EXTERN
12 fprintf(fp,"int generated() { return 3; }\n");
13 #else
14 fprintf(fp,"extern int gen_redirect(void);\n");
15 fprintf(fp,"int generated() { return gen_redirect(); }\n");
16 #endif
17 fclose(fp);
18 return 0;