1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmIncludeRegularExpressionCommand.h,v $
6 Date: $Date: 2008-01-23 15:27:59 $
7 Version: $Revision: 1.14 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmIncludeRegularExpressionCommand_h
18 #define cmIncludeRegularExpressionCommand_h
20 #include "cmCommand.h"
22 /** \class cmIncludeRegularExpressionCommand
23 * \brief Set the regular expression for following #includes.
25 * cmIncludeRegularExpressionCommand is used to specify the regular expression
26 * that determines whether to follow a #include file in dependency checking.
28 class cmIncludeRegularExpressionCommand
: public cmCommand
32 * This is a virtual constructor for the command.
34 virtual cmCommand
* Clone()
36 return new cmIncludeRegularExpressionCommand
;
40 * This is called when the command is first encountered in
41 * the CMakeLists.txt file.
43 virtual bool InitialPass(std::vector
<std::string
> const& args
,
44 cmExecutionStatus
&status
);
47 * The name of the command as specified in CMakeList.txt.
49 virtual const char* GetName() {return "include_regular_expression";}
52 * Succinct documentation.
54 virtual const char* GetTerseDocumentation()
56 return "Set the regular expression used for dependency checking.";
62 virtual const char* GetFullDocumentation()
65 " include_regular_expression(regex_match [regex_complain])\n"
66 "Set the regular expressions used in dependency checking. Only files "
67 "matching regex_match will be traced as dependencies. Only files "
68 "matching regex_complain will generate warnings if they cannot be "
70 "(standard header paths are not searched). The defaults are:\n"
71 " regex_match = \"^.*$\" (match everything)\n"
72 " regex_complain = \"^$\" (match empty string only)";
75 cmTypeMacro(cmIncludeRegularExpressionCommand
, cmCommand
);