cmWriteFileCommand.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmWriteFileCommand_h
  14. #define cmWriteFileCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmWriteFileCommand
  17. * \brief Writes a message to a file
  18. *
  19. */
  20. class cmWriteFileCommand : public cmCommand
  21. {
  22. public:
  23. /**
  24. * This is a virtual constructor for the command.
  25. */
  26. virtual cmCommand* Clone()
  27. {
  28. return new cmWriteFileCommand;
  29. }
  30. /**
  31. * This is called when the command is first encountered in
  32. * the CMakeLists.txt file.
  33. */
  34. virtual bool InitialPass(std::vector<std::string> const& args);
  35. /**
  36. * The name of the command as specified in CMakeList.txt.
  37. */
  38. virtual const char* GetName() { return "WRITE_FILE";}
  39. /**
  40. * Succinct documentation.
  41. */
  42. virtual const char* GetTerseDocumentation()
  43. {
  44. return "Write a message to a file.";
  45. }
  46. /**
  47. * More documentation.
  48. */
  49. virtual const char* GetFullDocumentation()
  50. {
  51. return
  52. " WRITE_FILE(filename \"message to write\"... [APPEND])\n"
  53. "The first argument is the file name, the rest of the arguments are "
  54. "messages to write. If the argument APPEND is specified, then "
  55. "the message will be appended.";
  56. }
  57. cmTypeMacro(cmWriteFileCommand, cmCommand);
  58. };
  59. #endif