cli tar: support for raw compression

This commit is contained in:
AJIOB
2026-01-06 09:49:58 +03:00
parent e4e29aeb66
commit 0b376b1bda
3 changed files with 18 additions and 3 deletions
+15 -2
View File
@@ -1488,8 +1488,21 @@ Available commands are:
.. versionadded:: 3.3
Specify the format of the archive to be created.
Supported formats are: ``7zip``, ``gnutar``, ``pax``,
``paxr`` (restricted pax, default), and ``zip``.
Supported formats are:
* ``7zip``
* ``gnutar``
* ``pax``
* ``paxr`` (restricted pax, default)
* ``raw``
.. versionadded:: 4.3
If this format is used, only one file will be compressed
with the compression type specified by the
:option:`--cmake-tar-compression-method <cmake-E_tar --cmake-tar-compression-method>`.
* ``zip``
If the compression method is not specified, the compression method
depends on the format:
@@ -3,3 +3,4 @@ cli-tar-compression-method
* The :manual:`cmake(1)` ``-E tar`` tool supports specifying compression method
via ``--cmake-tar-compression-method`` option
* The :manual:`cmake(1)` ``-E tar`` tool supports packing raw files via ``--format=raw``. This is useful for compressing tar files without any compression
+2 -1
View File
@@ -1576,7 +1576,8 @@ int cmcmd::ExecuteCMakeCommand(std::vector<std::string> const& args,
// Tar files
if (args[1] == "tar" && args.size() > 3) {
char const* knownFormats[] = { "7zip", "gnutar", "pax", "paxr", "zip" };
char const* knownFormats[] = { "7zip", "gnutar", "pax",
"paxr", "raw", "zip" };
std::string const& flags = args[2];
std::string const& outFile = args[3];