Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmIncludeCommand.h
blob3baad9b194f1d43d779bf7d343429b73387e86b7
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmIncludeCommand.h,v $
5 Language: C++
6 <<<<<<< cmIncludeCommand.h
7 Date: $Date: 2008/01/23 15:27:59 $
8 Version: $Revision: 1.17 $
9 =======
10 Date: $Date: 2009-01-22 18:18:39 $
11 Version: $Revision: 1.18 $
12 >>>>>>> 1.18
14 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
15 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
17 This software is distributed WITHOUT ANY WARRANTY; without even
18 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
19 PURPOSE. See the above copyright notices for more information.
21 =========================================================================*/
22 #ifndef cmIncludeCommand_h
23 #define cmIncludeCommand_h
25 #include "cmCommand.h"
27 /** \class cmIncludeCommand
28 * \brief
30 * cmIncludeCommand defines a list of distant
31 * files that can be "included" in the current list file.
32 * In almost every sense, this is identical to a C/C++
33 * #include command. Arguments are first expended as usual.
35 class cmIncludeCommand : public cmCommand
37 public:
38 /**
39 * This is a virtual constructor for the command.
41 virtual cmCommand* Clone()
43 return new cmIncludeCommand;
46 /**
47 * This is called when the command is first encountered in
48 * the CMakeLists.txt file.
50 virtual bool InitialPass(std::vector<std::string> const& args,
51 cmExecutionStatus &status);
53 /**
54 * This determines if the command is invoked when in script mode.
56 virtual bool IsScriptable() { return true; }
58 /**
59 * The name of the command as specified in CMakeList.txt.
61 virtual const char* GetName() {return "include";}
63 /**
64 * Succinct documentation.
66 virtual const char* GetTerseDocumentation()
68 return "Read CMake listfile code from the given file.";
71 /**
72 * More documentation.
74 virtual const char* GetFullDocumentation()
76 return
77 " include(<file|module> [OPTIONAL] [RESULT_VARIABLE <VAR>]\n"
78 " [NO_POLICY_SCOPE])\n"
79 "Reads CMake listfile code from the given file. Commands in the file "
80 "are processed immediately as if they were written in place of the "
81 "include command. If OPTIONAL is present, then no error "
82 "is raised if the file does not exist. If RESULT_VARIABLE is given "
83 "the variable will be set to the full filename which "
84 "has been included or NOTFOUND if it failed.\n"
85 "If a module is specified instead of a file, the file with name "
86 "<modulename>.cmake is searched in the CMAKE_MODULE_PATH."
87 "\n"
88 "See the cmake_policy() command documentation for discussion of the "
89 "NO_POLICY_SCOPE option."
93 cmTypeMacro(cmIncludeCommand, cmCommand);
98 #endif