diff options
author | Brad King <brad.king@kitware.com> | 2020-06-03 10:07:09 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-06-03 10:07:16 (GMT) |
commit | 42e6e296544e1412b5699aac0f1910eb7fd20bc5 (patch) | |
tree | f5ba8502d6c102952bddc377cf19a82eef43ed22 /Source | |
parent | 44aab71ee1bd1a4d11ca394bbffb0ae3adc6388e (diff) | |
parent | c339e5380fcf734f5b15a273ac73862c9a0c08ad (diff) | |
download | CMake-42e6e296544e1412b5699aac0f1910eb7fd20bc5.zip CMake-42e6e296544e1412b5699aac0f1910eb7fd20bc5.tar.gz CMake-42e6e296544e1412b5699aac0f1910eb7fd20bc5.tar.bz2 |
Merge topic 'cpack-archive-zip-timestamps'
c339e5380f CPack: Use SOURCE_DATE_EPOCH for all timestamps in archives
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4842
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmArchiveWrite.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmArchiveWrite.cxx b/Source/cmArchiveWrite.cxx index 78bb6e0..addfbff 100644 --- a/Source/cmArchiveWrite.cxx +++ b/Source/cmArchiveWrite.cxx @@ -282,7 +282,12 @@ bool cmArchiveWrite::AddFile(const char* file, size_t skip, const char* prefix) time_t epochTime; iss >> epochTime; if (iss.eof() && !iss.fail()) { + // Set all of the file times to the epoch time to handle archive + // formats that include creation/access time. archive_entry_set_mtime(e, epochTime, 0); + archive_entry_set_atime(e, epochTime, 0); + archive_entry_set_ctime(e, epochTime, 0); + archive_entry_set_birthtime(e, epochTime, 0); } } } |