diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index bea958612..524e53ed6 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) diff --git a/Source/cmArchiveWrite.h b/Source/cmArchiveWrite.h index 0bd3e9b00..ce7f961c6 100644 --- a/Source/cmArchiveWrite.h +++ b/Source/cmArchiveWrite.h @@ -33,7 +33,8 @@ public: CompressNone, CompressGZip, CompressBZip2, - CompressLZMA + CompressLZMA, + CompressXZ }; /** Archive Type */