cmMessageCommand.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 cmMessageCommand_h
  14. #define cmMessageCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmMessageCommand
  17. * \brief Displays a message to the user
  18. *
  19. */
  20. class cmMessageCommand : public cmCommand
  21. {
  22. public:
  23. /**
  24. * This is a virtual constructor for the command.
  25. */
  26. virtual cmCommand* Clone()
  27. {
  28. return new cmMessageCommand;
  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 "MESSAGE";}
  39. /**
  40. * This determines if the command is invoked when in script mode.
  41. */
  42. virtual bool IsScriptable() { return true; }
  43. /**
  44. * Succinct documentation.
  45. */
  46. virtual const char* GetTerseDocumentation()
  47. {
  48. return "Display a message to the user.";
  49. }
  50. /**
  51. * More documentation.
  52. */
  53. virtual const char* GetFullDocumentation()
  54. {
  55. return
  56. " MESSAGE([SEND_ERROR | STATUS | FATAL_ERROR]\n"
  57. " \"message to display\" ...)\n"
  58. "By default the message is displayed in a pop up window (CMakeSetup), "
  59. "or in the stdout of cmake, or the error section of ccmake. "
  60. "If the first argument is "
  61. "SEND_ERROR then an error is raised, and the generate phase will "
  62. "be skipped. If the first argument is FATAL_ERROR, all processing "
  63. "is halted. If the first argument is STATUS then the message is "
  64. "displayed in the progress line for the GUI, or with a -- in the "
  65. "command line cmake.";
  66. }
  67. cmTypeMacro(cmMessageCommand, cmCommand);
  68. };
  69. #endif