diff options
author | Kasper Laudrup <you@example.com> | 2022-03-15 18:27:54 (GMT) |
---|---|---|
committer | Kasper Laudrup <you@example.com> | 2022-03-23 13:41:34 (GMT) |
commit | 0b7fd783f82639ba129e62edeac0de6594542708 (patch) | |
tree | 6958f1bb75909c6fa703927b16d184d15a5de9b5 /Source/cmSystemTools.h | |
parent | f692cba34b758f5c308c3fd659c438ce022a0a80 (diff) | |
download | CMake-0b7fd783f82639ba129e62edeac0de6594542708.zip CMake-0b7fd783f82639ba129e62edeac0de6594542708.tar.gz CMake-0b7fd783f82639ba129e62edeac0de6594542708.tar.bz2 |
cmake -E tar: Add --touch option
Similar to GNU tar add a --touch option to the tar extract command to
skip extracting the timestamps from the files in the archive
effectively touching them as if they were just created.
Issue: #22746
Diffstat (limited to 'Source/cmSystemTools.h')
-rw-r--r-- | Source/cmSystemTools.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Source/cmSystemTools.h b/Source/cmSystemTools.h index 19dabe8..c17ecbd 100644 --- a/Source/cmSystemTools.h +++ b/Source/cmSystemTools.h @@ -417,6 +417,12 @@ public: TarCompressNone }; + enum class cmTarExtractTimestamps + { + Yes, + No + }; + static bool ListTar(const std::string& outFileName, const std::vector<std::string>& files, bool verbose); static bool CreateTar(const std::string& outFileName, @@ -426,7 +432,9 @@ public: std::string const& format = std::string(), int compressionLevel = 0); static bool ExtractTar(const std::string& inFileName, - const std::vector<std::string>& files, bool verbose); + const std::vector<std::string>& files, + cmTarExtractTimestamps extractTimestamps, + bool verbose); // This should be called first thing in main // it will keep child processes from inheriting the // stdin and stdout of this process. This is important |