cmAddTargetRule.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 cmAddTargetRule_h
  12. #define cmAddTargetRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmAddTargetRule
  16. * \brief Rule that adds a target to the build system.
  17. *
  18. * cmAddTargetRule adds an extra target to the build system.
  19. * This is useful when you would like to add special
  20. * targets like "install,", "clean," and so on.
  21. */
  22. class cmAddTargetRule : public cmRuleMaker
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the rule.
  27. */
  28. virtual cmRuleMaker* Clone()
  29. {
  30. return new cmAddTargetRule;
  31. }
  32. /**
  33. * This is called when the rule is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool Invoke(std::vector<std::string>& args);
  37. /**
  38. * This is called at the end after all the information
  39. * specified by the rules is accumulated.
  40. */
  41. virtual void FinalPass() {}
  42. /**
  43. * The name of the rule as specified in CMakeList.txt.
  44. */
  45. virtual const char* GetName()
  46. {return "ADD_TARGET";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* TerseDocumentation()
  51. {
  52. return "Add an extra target to the build system.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* FullDocumentation()
  58. {
  59. return
  60. "ADD_TARGET(Name \"command to run\");";
  61. }
  62. };
  63. #endif