cmITKWrapTclCommand.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 cmITKWrapTclCommand_h
  14. #define cmITKWrapTclCommand_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. class cmMakeDepend;
  18. /** \class cmITKWrapTclCommand
  19. * \brief Run CABLE to generate Tcl wrappers.
  20. *
  21. * cmITKWrapTclCommand runs CABLE on the specified configuration files
  22. * and combines them into a package on a given target.
  23. */
  24. class cmITKWrapTclCommand : public cmCommand
  25. {
  26. public:
  27. cmITKWrapTclCommand();
  28. ~cmITKWrapTclCommand();
  29. /** This is a virtual constructor for the command. */
  30. virtual cmCommand* Clone() { return new cmITKWrapTclCommand; }
  31. /** This is called when the command is first encountered in
  32. * the CMakeLists.txt file. */
  33. virtual bool InitialPass(std::vector<std::string> const& args);
  34. /** The name of the command as specified in CMakeList.txt. */
  35. virtual const char* GetName() {return "ITK_WRAP_TCL";}
  36. /** Succinct documentation. */
  37. virtual const char* GetTerseDocumentation()
  38. { return "Run CABLE to generate Tcl wrappers."; }
  39. /** More documentation. */
  40. virtual const char* GetFullDocumentation()
  41. {
  42. return
  43. "ITK_WRAP_TCL(target-name config-file1 [config-file2 ...])\n"
  44. "Run CABLE on all the configuration files to generate Tcl wrappers.\n"
  45. "The generated sources are added to a target of the given name.";
  46. }
  47. cmTypeMacro(cmITKWrapTclCommand, cmCommand);
  48. protected:
  49. cmStdString m_TargetName;
  50. cmTarget* m_Target;
  51. bool CreateCableRule(const char* configFile);
  52. std::string GetCableFromCache() const;
  53. cmMakeDepend* m_MakeDepend;
  54. };
  55. #endif