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