cmAddTargetRule.h 1.68 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile$
  Language:  C++
  Date:      $Date$
  Version:   $Revision$


  Copyright (c) 2000 National Library of Medicine
  All rights reserved.

  See COPYRIGHT.txt for copyright details.

=========================================================================*/
16
17
18
19
20
21
#ifndef cmAddTargetRule_h
#define cmAddTargetRule_h

#include "cmStandardIncludes.h"
#include "cmRuleMaker.h"

22
23
24
25
26
27
28
/** \class cmAddTargetRule
 * \brief Rule that adds a target to the build system.
 *
 * cmAddTargetRule adds an extra target to the build system.
 * This is useful when you would like to add special
 * targets like "install,", "clean," and so on.
 */
29
30
31
class cmAddTargetRule : public cmRuleMaker
{
public:
32
33
34
  /**
   * This is a virtual constructor for the rule.
   */
35
36
  virtual cmRuleMaker* Clone() 
    {
37
    return new cmAddTargetRule;
38
    }
39
40
41
42
43

  /**
   * This is called when the rule is first encountered in
   * the CMakeLists.txt file.
   */
44
45
  virtual bool Invoke(std::vector<std::string>& args);
  
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
  /**
   * This is called at the end after all the information
   * specified by the rules is accumulated.
   */
  virtual void FinalPass() {}
  
  /**
   * The name of the rule as specified in CMakeList.txt.
   */
  virtual const char* GetName() 
    {return "ADD_TARGET";}
  
  /**
   * Succinct documentation.
   */
  virtual const char* TerseDocumentation() 
62
    {
63
    return "Add an extra target to the build system.";
64
65
    }
  
66
67
68
69
  /**
   * More documentation.
   */
  virtual const char* FullDocumentation()
70
    {
71
    return
Will Schroeder's avatar
Will Schroeder committed
72
      "ADD_TARGET(Name \"command to run\")";
73
74
75
76
    }
};

#endif