cmDumpDocumentation.cxx 440 B

12345678910111213141516171819202122
  1. // Program extracts documentation describing commands from
  2. // the CMake system.
  3. //
  4. #include "cmMakefile.h"
  5. int main(int ac, char** av)
  6. {
  7. cmMakefile makefile;
  8. const char* outname = "cmake.html";
  9. if(ac > 1)
  10. {
  11. outname = av[1];
  12. }
  13. std::ofstream fout(outname);
  14. if(!fout)
  15. {
  16. std::cerr << "failed to open output file: " << outname << "\n";
  17. return -1;
  18. }
  19. makefile.DumpDocumentationToFile(fout);
  20. return 0;
  21. }