cmIncludeRegularExpressionCommand.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmIncludeRegularExpressionCommand_h
  11. #define cmIncludeRegularExpressionCommand_h
  12. #include "cmCommand.h"
  13. /** \class cmIncludeRegularExpressionCommand
  14. * \brief Set the regular expression for following #includes.
  15. *
  16. * cmIncludeRegularExpressionCommand is used to specify the regular expression
  17. * that determines whether to follow a #include file in dependency checking.
  18. */
  19. class cmIncludeRegularExpressionCommand : public cmCommand
  20. {
  21. public:
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. virtual cmCommand* Clone()
  26. {
  27. return new cmIncludeRegularExpressionCommand;
  28. }
  29. /**
  30. * This is called when the command is first encountered in
  31. * the CMakeLists.txt file.
  32. */
  33. virtual bool InitialPass(std::vector<std::string> const& args,
  34. cmExecutionStatus &status);
  35. /**
  36. * The name of the command as specified in CMakeList.txt.
  37. */
  38. virtual const char* GetName() {return "include_regular_expression";}
  39. /**
  40. * Succinct documentation.
  41. */
  42. virtual const char* GetTerseDocumentation()
  43. {
  44. return "Set the regular expression used for dependency checking.";
  45. }
  46. /**
  47. * More documentation.
  48. */
  49. virtual const char* GetFullDocumentation()
  50. {
  51. return
  52. " include_regular_expression(regex_match [regex_complain])\n"
  53. "Set the regular expressions used in dependency checking. Only files "
  54. "matching regex_match will be traced as dependencies. Only files "
  55. "matching regex_complain will generate warnings if they cannot be "
  56. "found "
  57. "(standard header paths are not searched). The defaults are:\n"
  58. " regex_match = \"^.*$\" (match everything)\n"
  59. " regex_complain = \"^$\" (match empty string only)";
  60. }
  61. cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand);
  62. };
  63. #endif