diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-08-23 21:40:07 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-08-23 21:40:07 (GMT) |
commit | a4f40c31f1e160ab34d90c1a5e9ed5ab6cc1de59 (patch) | |
tree | 554853021dba4b552bb22235b2f9a15a662fc989 /Source/cmDumpDocumentation.cxx | |
parent | 852be8a520a8a03268b499642c5257675b9ad7f2 (diff) | |
download | CMake-a4f40c31f1e160ab34d90c1a5e9ed5ab6cc1de59.zip CMake-a4f40c31f1e160ab34d90c1a5e9ed5ab6cc1de59.tar.gz CMake-a4f40c31f1e160ab34d90c1a5e9ed5ab6cc1de59.tar.bz2 |
ENH: add dump documentation test
Diffstat (limited to 'Source/cmDumpDocumentation.cxx')
-rw-r--r-- | Source/cmDumpDocumentation.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Source/cmDumpDocumentation.cxx b/Source/cmDumpDocumentation.cxx index 51db267..77771dd 100644 --- a/Source/cmDumpDocumentation.cxx +++ b/Source/cmDumpDocumentation.cxx @@ -3,10 +3,20 @@ // #include "cmMakefile.h" -int main() +int main(int ac, char** av) { cmMakefile makefile; - makefile.DumpDocumentationToFile("cmake.txt"); - + const char* outname = "cmake.html"; + if(ac > 1) + { + outname = av[1]; + } + std::ofstream fout(outname); + if(!fout) + { + std::cerr << "failed to open output file: " << outname << "\n"; + return -1; + } + makefile.DumpDocumentationToFile(fout); return 0; } |