cmIncludeRegularExpressionCommand.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 cmIncludeRegularExpressionCommand_h
  12. #define cmIncludeRegularExpressionCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmIncludeRegularExpressionCommand
  16. * \brief Set the regular expression for following #includes.
  17. *
  18. * cmIncludeRegularExpressionCommand is used to specify the regular expression
  19. * used by cmMakeDepend to determine whether to follow a #include file in
  20. * dependency checking.
  21. */
  22. class cmIncludeRegularExpressionCommand : public cmCommand
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the command.
  27. */
  28. virtual cmCommand* Clone()
  29. {
  30. return new cmIncludeRegularExpressionCommand;
  31. }
  32. /**
  33. * This is called when the command is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool Invoke(std::vector<std::string>& args);
  37. /**
  38. * The name of the command as specified in CMakeList.txt.
  39. */
  40. virtual const char* GetName() {return "INCLUDE_REGULAR_EXPRESSION";}
  41. /**
  42. * This determines if the command gets propagated down
  43. * to makefiles located in subdirectories.
  44. */
  45. virtual bool IsInherited()
  46. {
  47. return true;
  48. }
  49. /**
  50. * Succinct documentation.
  51. */
  52. virtual const char* GetTerseDocumentation()
  53. {
  54. return "Set the regular expression used for dependency checking.";
  55. }
  56. /**
  57. * More documentation.
  58. */
  59. virtual const char* GetFullDocumentation()
  60. {
  61. return
  62. "INCLUDE_REGULAR_EXPRESSION(regex)\n"
  63. "Sets the regular expression used in dependency checking. Only\n"
  64. "include files matching this regular expression will be traced.";
  65. }
  66. cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand);
  67. };
  68. #endif