cmUtilitySourceCommand.h 2.1 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 cmUtilitySourceCommand_h
  12. #define cmUtilitySourceCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmUtilitySourceCommand
  16. * \brief A command to setup a cache entry with the location of a third-party
  17. * utility's source.
  18. *
  19. * cmUtilitySourceCommand is used when a third-party utility's source is
  20. * included in the project's source tree. It specifies the location of
  21. * the executable's source, and any files that may be needed to confirm the
  22. * identity of the source.
  23. */
  24. class cmUtilitySourceCommand : public cmCommand
  25. {
  26. public:
  27. /**
  28. * This is a virtual constructor for the command.
  29. */
  30. virtual cmCommand* Clone()
  31. {
  32. return new cmUtilitySourceCommand;
  33. }
  34. /**
  35. * This is called when the command is first encountered in
  36. * the CMakeLists.txt file.
  37. */
  38. virtual bool Invoke(std::vector<std::string>& args);
  39. /**
  40. * The name of the command as specified in CMakeList.txt.
  41. */
  42. virtual const char* GetName() { return "UTILITY_SOURCE";}
  43. /**
  44. * Succinct documentation.
  45. */
  46. virtual const char* GetTerseDocumentation()
  47. {
  48. return "Specify the source tree of a third-party utility.";
  49. }
  50. /**
  51. * More documentation.
  52. */
  53. virtual const char* GetFullDocumentation()
  54. {
  55. return
  56. "UTILITY_SOURCE(cache_entry executable_name path_to_source [file1 file2 ...])\n"
  57. "When a third-party utility's source is included in the distribution,\n"
  58. "this command specifies its location and name. The cache entry will\n"
  59. "not be set unless the path_to_source and all listed files exist. It\n"
  60. "is assumed that the source tree of the utility will have been built\n"
  61. "before it is needed.";
  62. }
  63. cmTypeMacro(cmUtilitySourceCommand, cmCommand);
  64. };
  65. #endif