cmAddCustomCommandCommand.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmAddCustomCommandCommand_h
  12. #define cmAddCustomCommandCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmAddCustomCommandCommand
  16. * \brief
  17. *
  18. * cmAddCustomCommandCommand defines a new command that can
  19. * be executed within the CMake
  20. */
  21. class cmAddCustomCommandCommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmAddCustomCommandCommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool InitialPass(std::vector<std::string> const& args);
  36. /**
  37. * This determines if the command gets propagated down
  38. * to makefiles located in subdirectories.
  39. */
  40. virtual bool IsInherited() {return true;}
  41. /**
  42. * The name of the command as specified in CMakeList.txt.
  43. */
  44. virtual const char* GetName() {return "ADD_CUSTOM_COMMAND";}
  45. /**
  46. * Succinct documentation.
  47. */
  48. virtual const char* GetTerseDocumentation()
  49. {
  50. return "Create new command within CMake.";
  51. }
  52. /**
  53. * More documentation.
  54. */
  55. virtual const char* GetFullDocumentation()
  56. {
  57. return
  58. "ADD_CUSTOM_COMMAND(SOURCE source COMMAND command TARGET target "
  59. "[ARGS [args...]] [DEPENDS [depends...]] [OUTPUTS [outputs...]])\n"
  60. "Add a custom command.";
  61. }
  62. cmTypeMacro(cmAddCustomCommandCommand, cmCommand);
  63. };
  64. #endif