summaryrefslogtreecommitdiffstats
path: root/Source/cmDumpDocumentation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmDumpDocumentation.cxx')
-rw-r--r--Source/cmDumpDocumentation.cxx16
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;
}