summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-06-02 16:19:16 (GMT)
committerBrad King <brad.king@kitware.com>2006-06-02 16:19:16 (GMT)
commite1c110d2448e09ca087b9ac42dac04934bad8de6 (patch)
treeac626be76c3d0df30d8a35cce08539179cd5c1d9
parent886c559518ebf39ac91d6048c9c92320a9cde82e (diff)
downloadCMake-e1c110d2448e09ca087b9ac42dac04934bad8de6.zip
CMake-e1c110d2448e09ca087b9ac42dac04934bad8de6.tar.gz
CMake-e1c110d2448e09ca087b9ac42dac04934bad8de6.tar.bz2
BUG: Custom commands should actually generate the files they claim to generate.
-rw-r--r--Tests/Wrapping/Wrap.c14
-rw-r--r--Tests/Wrapping/fakefluid.cxx4
2 files changed, 15 insertions, 3 deletions
diff --git a/Tests/Wrapping/Wrap.c b/Tests/Wrapping/Wrap.c
index 5b47c96..8131639 100644
--- a/Tests/Wrapping/Wrap.c
+++ b/Tests/Wrapping/Wrap.c
@@ -1,7 +1,17 @@
#include <stdio.h>
-int main()
+int main(int argc, const char* argv[])
{
- printf("Hello\n");
+ FILE* fout = fopen(argv[argc-1], "w");
+ printf("Wrap creating \"%s\"\n", argv[argc-1]);
+ if(fout)
+ {
+ fprintf(fout, "int foo() { return 0; }\n");
+ fclose(fout);
+ }
+ else
+ {
+ return -1;
+ }
return 0;
}
diff --git a/Tests/Wrapping/fakefluid.cxx b/Tests/Wrapping/fakefluid.cxx
index 25c6e93..6e71eab 100644
--- a/Tests/Wrapping/fakefluid.cxx
+++ b/Tests/Wrapping/fakefluid.cxx
@@ -4,8 +4,10 @@ int main(int ac, char** av)
{
for(int i =0; i < ac; ++i)
{
- if(strcmp(av[i], "-o") == 0)
+ if(strcmp(av[i], "-o") == 0 ||
+ strcmp(av[i], "-h") == 0)
{
+ fprintf(stdout, "fakefluid is creating file \"%s\"\n", av[i+1]);
FILE* file = fopen(av[i+1], "w");
fprintf(file, "// hello\n");
fclose(file);