cmIncludeRegularExpressionCommand.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html 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 cmIncludeRegularExpressionCommand_h
  14. #define cmIncludeRegularExpressionCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmIncludeRegularExpressionCommand
  17. * \brief Set the regular expression for following #includes.
  18. *
  19. * cmIncludeRegularExpressionCommand is used to specify the regular expression
  20. * used by cmMakeDepend to determine whether to follow a #include file in
  21. * dependency checking.
  22. */
  23. class cmIncludeRegularExpressionCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmIncludeRegularExpressionCommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args);
  38. /**
  39. * The name of the command as specified in CMakeList.txt.
  40. */
  41. virtual const char* GetName() {return "INCLUDE_REGULAR_EXPRESSION";}
  42. /**
  43. * Succinct documentation.
  44. */
  45. virtual const char* GetTerseDocumentation()
  46. {
  47. return "Set the regular expression used for dependency checking.";
  48. }
  49. /**
  50. * More documentation.
  51. */
  52. virtual const char* GetFullDocumentation()
  53. {
  54. return
  55. " INCLUDE_REGULAR_EXPRESSION(regex_match [regex_complain])\n"
  56. "Set the regular expressions used in dependency checking. Only files "
  57. "matching regex_match will be traced as dependencies. Only files "
  58. "matching regex_complain will generate warnings if they cannot be "
  59. "found "
  60. "(standard header paths are not searched). The defaults are:\n"
  61. " regex_match = \"^.*$\" (match everything)\n"
  62. " regex_complain = \"^$\" (match empty string only)";
  63. }
  64. cmTypeMacro(cmIncludeRegularExpressionCommand, cmCommand);
  65. };
  66. #endif