Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmIncludeCommand.h
blob4a455667c6f61de2392d91b40754fff89c4a5d4c
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmIncludeCommand.h,v $
5 Language: C++
6 Date: $Date: 2008/01/23 15:27:59 $
7 Version: $Revision: 1.17 $
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 cmIncludeCommand_h
18 #define cmIncludeCommand_h
20 #include "cmCommand.h"
22 /** \class cmIncludeCommand
23 * \brief
25 * cmIncludeCommand defines a list of distant
26 * files that can be "included" in the current list file.
27 * In almost every sense, this is identical to a C/C++
28 * #include command. Arguments are first expended as usual.
30 class cmIncludeCommand : public cmCommand
32 public:
33 /**
34 * This is a virtual constructor for the command.
36 virtual cmCommand* Clone()
38 return new cmIncludeCommand;
41 /**
42 * This is called when the command is first encountered in
43 * the CMakeLists.txt file.
45 virtual bool InitialPass(std::vector<std::string> const& args,
46 cmExecutionStatus &status);
48 /**
49 * This determines if the command is invoked when in script mode.
51 virtual bool IsScriptable() { return true; }
53 /**
54 * The name of the command as specified in CMakeList.txt.
56 virtual const char* GetName() {return "include";}
58 /**
59 * Succinct documentation.
61 virtual const char* GetTerseDocumentation()
63 return "Read CMake listfile code from the given file.";
66 /**
67 * More documentation.
69 virtual const char* GetFullDocumentation()
71 return
72 " include(file1 [OPTIONAL] [RESULT_VARIABLE <VAR>])\n"
73 " include(module [OPTIONAL] [RESULT_VARIABLE <VAR>])\n"
74 "Reads CMake listfile code from the given file. Commands in the file "
75 "are processed immediately as if they were written in place of the "
76 "include command. If OPTIONAL is present, then no error "
77 "is raised if the file does not exist. If RESULT_VARIABLE is given "
78 "the variable will be set to the full filename which "
79 "has been included or NOTFOUND if it failed.\n"
80 "If a module is specified instead of a file, the file with name "
81 "<modulename>.cmake is searched in the CMAKE_MODULE_PATH.";
84 cmTypeMacro(cmIncludeCommand, cmCommand);
89 #endif