summaryrefslogtreecommitdiffstats
path: root/Source/cmArchiveWrite.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-01-14 18:22:29 (GMT)
committerBrad King <brad.king@kitware.com>2015-01-19 19:16:19 (GMT)
commit3a60c899fce77f221cba670b62c90fe2d2daffed (patch)
tree7d7db3b6820f0766b5ecbdcb411b5d5b07ba6ed7 /Source/cmArchiveWrite.h
parent90f9c42732a18e53943c3aa27de76c2511c5a0c6 (diff)
downloadCMake-3a60c899fce77f221cba670b62c90fe2d2daffed.zip
CMake-3a60c899fce77f221cba670b62c90fe2d2daffed.tar.gz
CMake-3a60c899fce77f221cba670b62c90fe2d2daffed.tar.bz2
cmake: Teach "-E tar" command a "--mtime=" option
Add an option to set the mtime of entries in a tarball so that one can create a tarball with a consistent content hash (e.g. MD5) for a given set of files regardless of their current timestamps on disk. This will be useful for submission of tarballs to CDash, which tracks content hashes to avoid duplication. Inspired-by: Bill Hoffman <bill.hoffman@kitware.com>
Diffstat (limited to 'Source/cmArchiveWrite.h')
-rw-r--r--Source/cmArchiveWrite.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/cmArchiveWrite.h b/Source/cmArchiveWrite.h
index a6dcc0e..17357b4 100644
--- a/Source/cmArchiveWrite.h
+++ b/Source/cmArchiveWrite.h
@@ -74,6 +74,7 @@ public:
// std::cout.
void SetVerbose(bool v) { this->Verbose = v; }
+ void SetMTime(std::string const& t) { this->MTime = t; }
private:
bool Okay() const { return this->Error.empty(); }
bool AddPath(const char* path, size_t skip, const char* prefix);
@@ -90,6 +91,7 @@ private:
struct archive* Disk;
bool Verbose;
std::string Error;
+ std::string MTime;
};
#endif