summaryrefslogtreecommitdiff
path: root/Source/cmInstallCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmInstallCommand.h')
-rw-r--r--Source/cmInstallCommand.h30
1 files changed, 23 insertions, 7 deletions
diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h
index 296bc3f0ca..c692c223bc 100644
--- a/Source/cmInstallCommand.h
+++ b/Source/cmInstallCommand.h
@@ -68,16 +68,29 @@ public:
"\n"
"There are multiple signatures for this command. Some of them define "
"installation properties for files and targets. Properties common to "
- "multiple signatures are covered here. DESTINATION arguments specify "
+ "multiple signatures are covered here but they are valid only for "
+ "signatures that specify them. "
+ "DESTINATION arguments specify "
"the directory on disk to which a file will be installed. "
"If a full path (with a leading slash or drive letter) is given it "
"is used directly. If a relative path is given it is interpreted "
- "relative to the value of CMAKE_INSTALL_PREFIX."
+ "relative to the value of CMAKE_INSTALL_PREFIX. "
+ "PERMISSIONS arguments specify permissions for installed files. "
+ "Valid permissions are "
+ "OWNER_READ, OWNER_WRITE, OWNER_EXECUTE, "
+ "GROUP_READ, GROUP_WRITE, GROUP_EXECUTE, "
+ "WORLD_READ, WORLD_WRITE, WORLD_EXECUTE, "
+ "SETUID, and SETGID. "
+ "Permissions that do not make sense on certain platforms are ignored "
+ "on those platforms. "
+ "The RENAME argument specifies a name for an installed file that "
+ "may be different from the original file. Renaming is allowed only "
+ "when a single file is installed by the command. "
"\n"
"The TARGETS signature:\n"
- " INSTALL(TARGETS [targets...] [[LIBRARY|RUNTIME]\n"
- " [DESTINATION <dir>]\n"
- " ] [...])\n"
+ " INSTALL(TARGETS targets... [[LIBRARY|RUNTIME]\n"
+ " [DESTINATION <dir>]\n"
+ " ] [...])\n"
"The TARGETS form specifies rules for installing targets from a "
"project. There are two kinds of target files that may be "
"installed: library and runtime. Static libraries and modules "
@@ -110,14 +123,16 @@ public:
"/some/full/path."
"\n"
"The FILES signature:\n"
- " INSTALL(FILES [files...] DESTINATION <dir>)\n"
+ " INSTALL(FILES files... DESTINATION <dir>\n"
+ " [PERMISSIONS permissions...] [RENAME <name>])\n"
"The FILES form specifies rules for installing files for a "
"project. File names given as relative paths are interpreted with "
"respect to the current source directory. Files installed by this "
"form are given the same permissions as the original file by default."
"\n"
"The PROGRAMS signature:\n"
- " INSTALL(PROGRAMS [files...] DESTINATION <dir>)\n"
+ " INSTALL(PROGRAMS files... DESTINATION <dir>\n"
+ " [PERMISSIONS permissions...] [RENAME <name>])\n"
"The PROGRAMS form is identical to the FILES form except that the "
"default permissions for the installed file mark it as executable. "
"This form is intended to install programs that are not targets, "
@@ -147,6 +162,7 @@ private:
bool HandleTargetsMode(std::vector<std::string> const& args);
bool HandleFilesMode(std::vector<std::string> const& args);
void ComputeDestination(const char* destination, std::string& dest);
+ bool CheckPermissions(std::string const& arg, std::string& permissions);
};