diff options
author | Craig Scott <craig.scott@crascit.com> | 2020-06-30 11:43:37 (GMT) |
---|---|---|
committer | Craig Scott <craig.scott@crascit.com> | 2020-06-30 12:01:35 (GMT) |
commit | bbcff21f716f25649d744553b9085c8e6c0c1a35 (patch) | |
tree | 9a1fe2b2e9a34ad7756beaf03ddc53b58782f602 /Help/command | |
parent | e23428c99f146699dbcc724c45837cd61bc13ae7 (diff) | |
download | CMake-bbcff21f716f25649d744553b9085c8e6c0c1a35.zip CMake-bbcff21f716f25649d744553b9085c8e6c0c1a35.tar.gz CMake-bbcff21f716f25649d744553b9085c8e6c0c1a35.tar.bz2 |
file(ARCHIVE*): Collapse FILES and DIRECTORY options
The two options were concatenated internally for both ARCHIVE_CREATE
and ARCHIVE_EXTRACT. The distinction between files and dirs was not
meaningful. Therefore, replace them with PATHS or PATTERNS
to more accurately describe the way the options are used.
Fixes: #20884
Diffstat (limited to 'Help/command')
-rw-r--r-- | Help/command/file.rst | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/Help/command/file.rst b/Help/command/file.rst index b109f9d..3dbb3a5 100644 --- a/Help/command/file.rst +++ b/Help/command/file.rst @@ -900,15 +900,15 @@ Archiving .. code-block:: cmake file(ARCHIVE_CREATE OUTPUT <archive> - [FILES <files>] - [DIRECTORY <dirs>] + PATHS <paths>... [FORMAT <format>] [COMPRESSION <compression>] [MTIME <mtime>] [VERBOSE]) -Creates the specified ``<archive>`` file with the content of ``<files>`` and -``<dirs>``. +Creates the specified ``<archive>`` file with the files and directories +listed in ``<paths>``. Note that ``<paths>`` must list actual files or +directories, wildcards are not supported. Use the ``FORMAT`` option to specify the archive format. Supported values for ``<format>`` are ``7zip``, ``gnutar``, ``pax``, ``paxr``, ``raw`` and @@ -934,21 +934,23 @@ the ``MTIME`` option. .. code-block:: cmake file(ARCHIVE_EXTRACT INPUT <archive> - [FILES <files>] - [DIRECTORY <dirs>] [DESTINATION <dir>] + [PATTERNS <patterns>...] [LIST_ONLY] [VERBOSE]) -Extracts or lists the content of an archive specified by ``INPUT``. +Extracts or lists the content of the specified ``<archive>``. -The directory where the content of the archive will be extracted can -be specified via ``DESTINATION``. If the directory does not exit, it -will be created. +The directory where the content of the archive will be extracted to can +be specified using the ``DESTINATION`` option. If the directory does not +exist, it will be created. If ``DESTINATION`` is not given, the current +binary directory will be used. -To select which files and directories will be extracted or listed -use ``FILES`` and ``DIRECTORY`` options. +If required, you may select which files and directories to list or extract +from the archive using the specified ``<patterns>``. Wildcards are supported. +If the ``PATTERNS`` option is not given, the entire archive will be listed or +extracted. -``LIST_ONLY`` will only list the files in the archive. +``LIST_ONLY`` will list the files in the archive rather than extract them. -With ``VERBOSE`` the command will produce verbose output. +With ``VERBOSE``, the command will produce verbose output. |