Initial commit.
[CMakeLuaTailorHgBridge.git] / CMakeLua / Source / cmInstallProgramsCommand.h
blobced0b4d90c2463e085f7e2d500cff7fb0111bfc1
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmInstallProgramsCommand.h,v $
5 Language: C++
6 Date: $Date: 2008/01/23 15:27:59 $
7 Version: $Revision: 1.20 $
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 cmInstallProgramsCommand_h
18 #define cmInstallProgramsCommand_h
20 #include "cmCommand.h"
22 /** \class cmInstallProgramsCommand
23 * \brief Specifies where to install some programs
25 * cmInstallProgramsCommand specifies the relative path where a list of
26 * programs should be installed.
28 class cmInstallProgramsCommand : public cmCommand
30 public:
31 /**
32 * This is a virtual constructor for the command.
34 virtual cmCommand* Clone()
36 return new cmInstallProgramsCommand;
39 /**
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);
46 /**
47 * The name of the command as specified in CMakeList.txt.
49 virtual const char* GetName() { return "install_programs";}
51 /**
52 * Succinct documentation.
54 virtual const char* GetTerseDocumentation()
56 return "Deprecated. Use the install(PROGRAMS ) command instead.";
59 /**
60 * This is called at the end after all the information
61 * specified by the command is accumulated. Most commands do
62 * not implement this method. At this point, reading and
63 * writing to the cache can be done.
65 virtual void FinalPass();
67 /**
68 * More documentation.
70 virtual const char* GetFullDocumentation()
72 return
73 "This command has been superceded by the install command. It "
74 "is provided for compatibility with older CMake code. "
75 "The FILES form is directly replaced by the PROGRAMS form of the "
76 "INSTALL command. The regexp form can be expressed more clearly "
77 "using the GLOB form of the FILE command.\n"
78 " install_programs(<dir> file1 file2 [file3 ...])\n"
79 " install_programs(<dir> FILES file1 [file2 ...])\n"
80 "Create rules to install the listed programs into the given directory. "
81 "Use the FILES argument to guarantee that the file list version of "
82 "the command will be used even when there is only one argument.\n"
83 " install_programs(<dir> regexp)\n"
84 "In the second form any program in the current source directory that "
85 "matches the regular expression will be installed.\n"
86 "This command is intended to install programs that are not built "
87 "by cmake, such as shell scripts. See the TARGETS form of "
88 "the INSTALL command to "
89 "create installation rules for targets built by cmake.\n"
90 "The directory <dir> is relative to the installation prefix, which "
91 "is stored in the variable CMAKE_INSTALL_PREFIX.";
94 /** This command is kept for compatibility with older CMake versions. */
95 virtual bool IsDiscouraged()
97 return true;
100 cmTypeMacro(cmInstallProgramsCommand, cmCommand);
102 protected:
103 std::string FindInstallSource(const char* name) const;
104 private:
105 std::vector<std::string> FinalArgs;
106 std::string Destination;
107 std::vector<std::string> Files;
111 #endif