diff options
author | Sibi Siddharthan <sibisiddharthan.github@gmail.com> | 2020-08-11 18:33:59 (GMT) |
---|---|---|
committer | Sibi Siddharthan <sibisiddharthan.github@gmail.com> | 2020-08-26 15:52:50 (GMT) |
commit | 7de60beddf5b41f643e187fe487ffb91cd47e9f7 (patch) | |
tree | eb7719b6896f43414a5aea8d4ea5249ed33f21b2 /Help/command/file.rst | |
parent | 675be013e90eb1ae86e4259b55116d29cf2e1d73 (diff) | |
download | CMake-7de60beddf5b41f643e187fe487ffb91cd47e9f7.zip CMake-7de60beddf5b41f643e187fe487ffb91cd47e9f7.tar.gz CMake-7de60beddf5b41f643e187fe487ffb91cd47e9f7.tar.bz2 |
file: Add CHMOD and CHMOD_RECURSE subcommands
Fixes: #21057
Signed-off-by: Sibi Siddharthan <sibisiddharthan.github@gmail.com>
Diffstat (limited to 'Help/command/file.rst')
-rw-r--r-- | Help/command/file.rst | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst index 953172b..9d6ff91 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -30,6 +30,8 @@ Synopsis file(`SIZE`_ <filename> <out-var>) file(`READ_SYMLINK`_ <linkname> <out-var>) file(`CREATE_LINK`_ <original> <linkname> [...]) + file(`CHMOD`_ <files>... <directories>... PERMISSIONS <permissions>... [...]) + file(`CHMOD_RECURSE`_ <files>... <directories>... PERMISSIONS <permissions>... [...]) `Path Conversion`_ file(`RELATIVE_PATH`_ <out-var> <directory> <file>) @@ -741,6 +743,51 @@ creating the link fails. It can be useful for handling situations such as ``<original>`` and ``<linkname>`` being on different drives or mount points, which would make them unable to support a hard link. +.. _CHMOD: + +.. code-block:: cmake + + file(CHMOD <files>... <directories>... [PERMISSIONS <permissions>...] + [FILE_PERMISSIONS <permissions>...] + [DIRECTORY_PERMISSIONS <permissions>...]) + +Set the permissions for the ``<files>...`` and ``<directories>...`` specified. +Valid permissions are ``OWNER_READ``, ``OWNER_WRITE``, ``OWNER_EXECUTE``, +``GROUP_READ``, ``GROUP_WRITE``, ``GROUP_EXECUTE``, ``WORLD_READ``, +``WORLD_WRITE``, ``WORLD_EXECUTE``. + +Valid combination of keywords are: + +``PERMISSIONS`` + all items are changed + +``FILE_PERMISSIONS`` + only files are changed + +``DIRECTORY_PERMISSIONS`` + only directories are changed + +``PERMISSIONS`` and ``FILE_PERMISSIONS`` + ``FILE_PERMISSIONS`` overrides ``PERMISSIONS`` for files + +``PERMISSIONS`` and ``DIRECTORY_PERMISSIONS`` + ``DIRECTORY_PERMISSIONS`` overrides ``PERMISSIONS`` for directories + +``FILE_PERMISSIONS`` and ``DIRECTORY_PERMISSIONS`` + use ``FILE_PERMISSIONS`` for files and ``DIRECTORY_PERMISSIONS`` for + directories + + +.. _CHMOD_RECURSE: + +.. code-block:: cmake + + file(CHMOD_RECURSE <files>... <directories>... PERMISSIONS <permissions>... + FILE_PERMISSIONS <permissions>... DIRECTORY_PERMISSIONS <permissions>...) + +Same as `CHMOD`_, but change the permissions of files and directories present in +the ``<directories>..`` recursively. + Path Conversion ^^^^^^^^^^^^^^^ |