diff options
author | Brad King <brad.king@kitware.com> | 2017-07-18 15:12:36 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-07-18 15:12:57 (GMT) |
commit | 407c7415f41fc27578bb0ab2c831e767de575531 (patch) | |
tree | 524a20772e67be615cc71f77f8b12d81cfc28963 /Source/CPack/cmCPackDebGenerator.cxx | |
parent | b10d919de763000801cbffd4f58cbd0c4a1ad7a0 (diff) | |
parent | c4de0a25ac8b7bb94205e24b5557331ed80d79b8 (diff) | |
download | CMake-407c7415f41fc27578bb0ab2c831e767de575531.zip CMake-407c7415f41fc27578bb0ab2c831e767de575531.tar.gz CMake-407c7415f41fc27578bb0ab2c831e767de575531.tar.bz2 |
Merge topic 'cmake-E-sha'
c4de0a25 Add sha1sum, sha224sum, sha256sum, sha384sum and sha512sum to command mode
c4647d84 Change ComputeFileMD5 to ComputeFileHash
501a4fee Add some unit tests for md5sum
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1021
Diffstat (limited to 'Source/CPack/cmCPackDebGenerator.cxx')
-rw-r--r-- | Source/CPack/cmCPackDebGenerator.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx index 00d017e..0705460 100644 --- a/Source/CPack/cmCPackDebGenerator.cxx +++ b/Source/CPack/cmCPackDebGenerator.cxx @@ -6,6 +6,7 @@ #include "cmCPackComponentGroup.h" #include "cmCPackGenerator.h" #include "cmCPackLog.h" +#include "cmCryptoHash.h" #include "cmGeneratedFileStream.h" #include "cmSystemTools.h" #include "cm_sys_stat.h" @@ -527,15 +528,13 @@ int cmCPackDebGenerator::createDeb() continue; } - char md5sum[33]; - if (!cmSystemTools::ComputeFileMD5(*fileIt, md5sum)) { + std::string output = + cmSystemTools::ComputeFileHash(*fileIt, cmCryptoHash::AlgoMD5); + if (output.empty()) { cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem computing the md5 of " << *fileIt << std::endl); } - md5sum[32] = 0; - - std::string output(md5sum); output += " " + *fileIt + "\n"; // debian md5sums entries are like this: // 014f3604694729f3bf19263bac599765 usr/bin/ccmake |