~ubuntu-branches/ubuntu/jaunty/cmake/jaunty-security

« back to all changes in this revision

Viewing changes to Source/cmITKWrapTclCommand.h

  • Committer: Bazaar Package Importer
  • Author(s): A. Maitland Bottoms
  • Date: 2005-03-02 09:22:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050302092244-y6o9j8wr27vqcqvx
Tags: 2.0.5-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*=========================================================================
 
2
 
 
3
  Program:   CMake - Cross-Platform Makefile Generator
 
4
  Module:    $RCSfile: cmITKWrapTclCommand.h,v $
 
5
  Language:  C++
 
6
  Date:      $Date: 2003/08/10 22:30:53 $
 
7
  Version:   $Revision: 1.6 $
 
8
 
 
9
  Copyright (c) 2002 Kitware, Inc., Insight Consortium.  All rights reserved.
 
10
  See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
 
11
 
 
12
     This software is distributed WITHOUT ANY WARRANTY; without even 
 
13
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
 
14
     PURPOSE.  See the above copyright notices for more information.
 
15
 
 
16
=========================================================================*/
 
17
#ifndef cmITKWrapTclCommand_h
 
18
#define cmITKWrapTclCommand_h
 
19
 
 
20
#include "cmCommand.h"
 
21
class cmDependInformation;
 
22
class cmMakeDepend;
 
23
 
 
24
/** \class cmITKWrapTclCommand
 
25
 * \brief Run CABLE to generate Tcl wrappers.
 
26
 *
 
27
 * cmITKWrapTclCommand runs CABLE on the specified configuration files
 
28
 * and combines them into a package on a given target.
 
29
 */
 
30
class cmITKWrapTclCommand : public cmCommand
 
31
{
 
32
public:
 
33
  cmITKWrapTclCommand();
 
34
  ~cmITKWrapTclCommand();
 
35
  
 
36
  /** This is a virtual constructor for the command.  */
 
37
  virtual cmCommand* Clone() { return new cmITKWrapTclCommand; }
 
38
 
 
39
  /** This is called when the command is first encountered in
 
40
   * the CMakeLists.txt file.  */
 
41
  virtual bool InitialPass(std::vector<std::string> const& args);
 
42
 
 
43
  /** The name of the command as specified in CMakeList.txt. */
 
44
  virtual const char* GetName() {return "ITK_WRAP_TCL";}
 
45
  
 
46
  /** Succinct documentation.  */
 
47
  virtual const char* GetTerseDocumentation() 
 
48
    { return "Run CABLE to generate Tcl wrappers."; }
 
49
  
 
50
  /** More documentation. */
 
51
  virtual const char* GetFullDocumentation()
 
52
    {
 
53
    return
 
54
      "  ITK_WRAP_TCL(target-name config-file1 [config-file2 ...])\n"
 
55
      "Run CABLE on all the configuration files to generate Tcl wrappers.  "
 
56
      "The generated sources are added to a target of the given name.  This "
 
57
      "command is provided for use by the Insight Toolkit (ITK) because it "
 
58
      "was originally written before loaded commands were supported.";
 
59
    }
 
60
  
 
61
  cmTypeMacro(cmITKWrapTclCommand, cmCommand);
 
62
protected:  
 
63
  void AddDependencies(cmDependInformation const*info,
 
64
                       std::vector<std::string>& depends,
 
65
                       std::set<cmDependInformation const*>& visited);
 
66
  cmStdString m_TargetName;
 
67
  cmTarget* m_Target;
 
68
  
 
69
  bool CreateCableRule(const char* configFile);
 
70
  std::string GetCableFromCache() const;
 
71
  
 
72
  cmMakeDepend* m_MakeDepend;
 
73
};
 
74
 
 
75
#endif