mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-11 16:50:50 -05:00
cmArchiveWrite: support setting archive filter options
This commit is contained in:
@@ -369,3 +369,16 @@ bool cmArchiveWrite::AddData(const char* file, size_t size)
|
|||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cmArchiveWrite::SetFilterOption(const char* module, const char* key,
|
||||||
|
const char* value)
|
||||||
|
{
|
||||||
|
if (archive_write_set_filter_option(this->Archive, module, key, value) !=
|
||||||
|
ARCHIVE_OK) {
|
||||||
|
this->Error = "archive_write_set_filter_option: ";
|
||||||
|
this->Error += cm_archive_error_string(this->Archive);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ public:
|
|||||||
this->Gname = "";
|
this->Gname = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Set an option on a filter;
|
||||||
|
bool SetFilterOption(const char* module, const char* key, const char* value);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool Okay() const { return this->Error.empty(); }
|
bool Okay() const { return this->Error.empty(); }
|
||||||
bool AddPath(const char* path, size_t skip, const char* prefix,
|
bool AddPath(const char* path, size_t skip, const char* prefix,
|
||||||
|
|||||||
Reference in New Issue
Block a user