summaryrefslogtreecommitdiffstats
path: root/Source/cmArchiveWrite.cxx
diff options
context:
space:
mode:
authorEric NOULARD <eric.noulard@gmail.com>2010-08-13 15:51:27 (GMT)
committerEric NOULARD <eric.noulard@gmail.com>2010-08-13 15:51:27 (GMT)
commit1a3ad5c615be02cd18fe8e166b16ee15f821df72 (patch)
tree80b8b549d8f3dedeeee04a2a38d4fc12bb37f019 /Source/cmArchiveWrite.cxx
parentb50c15915ac5cca79e00bf438dacd074fe531978 (diff)
downloadCMake-1a3ad5c615be02cd18fe8e166b16ee15f821df72.zip
CMake-1a3ad5c615be02cd18fe8e166b16ee15f821df72.tar.gz
CMake-1a3ad5c615be02cd18fe8e166b16ee15f821df72.tar.bz2
Add XZ compress support to libarchive-wrapper
This is not needed but it does not cost much to do it for all potentially supported format in libarchive. XZ and LZMA are not builtin libarchive and require external lib but if CMAKE_USE_SYSTEM_LIBARCHIVE is ON then we may get it for free.
Diffstat (limited to 'Source/cmArchiveWrite.cxx')
-rw-r--r--Source/cmArchiveWrite.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx
index bea9586..524e53e 100644
--- a/Source/cmArchiveWrite.cxx
+++ b/Source/cmArchiveWrite.cxx
@@ -87,6 +87,14 @@ cmArchiveWrite::cmArchiveWrite(std::ostream& os, Compress c, Type t):
return;
}
break;
+ case CompressXZ:
+ if(archive_write_set_compression_xz(this->Archive) != ARCHIVE_OK)
+ {
+ this->Error = "archive_write_set_compression_xz: ";
+ this->Error += archive_error_string(this->Archive);
+ return;
+ }
+ break;
};
#if !defined(_WIN32) || defined(__CYGWIN__)
if (archive_read_disk_set_standard_lookup(this->Disk) != ARCHIVE_OK)