mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-09 01:01:12 +00:00
file(ARCHIVE_EXTRACT): Add PATTERNS_EXCLUDE option
Omit archive entries matching the given patterns when extracting or listing. May be combined with PATTERNS; on overlap the exclusion takes precedence. Fixes: #27837
This commit is contained in:
@@ -1080,6 +1080,7 @@ Archiving
|
||||
[DESTINATION <dir>]
|
||||
[ENCODING <encoding>]
|
||||
[PATTERNS <pattern>...]
|
||||
[PATTERNS_EXCLUDE <pattern>...]
|
||||
[LIST_ONLY]
|
||||
[VERBOSE]
|
||||
[TOUCH])
|
||||
@@ -1137,6 +1138,18 @@ Archiving
|
||||
patterns. Wildcards are supported. If the ``PATTERNS`` option is
|
||||
not given, the entire archive will be listed or extracted.
|
||||
|
||||
``PATTERNS_EXCLUDE <pattern>...``
|
||||
.. versionadded:: 4.5
|
||||
|
||||
Do not extract or list files and directories that match one of the given
|
||||
patterns. Wildcards are supported. This option may be combined with
|
||||
``PATTERNS``; an entry that matches both an inclusion pattern and an
|
||||
exclusion pattern is excluded.
|
||||
|
||||
Unlike ``PATTERNS``, exclusion patterns are not anchored to the start of
|
||||
an entry's path: a pattern matches if it matches any portion of the path.
|
||||
This is consistent with the ``--exclude`` option of command-line ``tar``.
|
||||
|
||||
``LIST_ONLY``
|
||||
List the files in the archive rather than extract them.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user