diff options
author | Brad King <brad.king@kitware.com> | 2023-08-10 12:57:04 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-08-10 12:57:16 (GMT) |
commit | b47b44630ba14a8cd748bee06f47645862451506 (patch) | |
tree | a0aeb857615759f149ba2c575b508a3b2bd376bb /Source/cmcmd.cxx | |
parent | f16bbea383327b75c9fb710aa4feabcee3686bbf (diff) | |
parent | 4980f47b4691ad7f4b4a579484fb43bed4db5c99 (diff) | |
download | CMake-b47b44630ba14a8cd748bee06f47645862451506.zip CMake-b47b44630ba14a8cd748bee06f47645862451506.tar.gz CMake-b47b44630ba14a8cd748bee06f47645862451506.tar.bz2 |
Merge topic 'cmSystemTools-hash-cleanup'
4980f47b46 cmGlobalGenerator: always support generating rule hashes
b334dc84c3 cmLocalGenerator: always support shortening filenames
36bd3d82f8 cmSystemTools: move `ComputeCertificateThumbprint` to the only consumer
a4e4daceaf cmSystemTools: remove `ComputeFileHash` method
0abde043d2 cmCryptoHash: prefer to cmSystemTools::ComputeFileHash
4d5198a986 cmSystemTools: remove `ComputeStringMD5` method
ec5f1c489a cmCryptoHash: prefer to cmSystemTools::ComputeStringMD5
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8695
Diffstat (limited to 'Source/cmcmd.cxx')
-rw-r--r-- | Source/cmcmd.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index ce2479b..b18f5cf 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -13,6 +13,7 @@ #include "cmCommandLineArgument.h" #include "cmConsoleBuf.h" +#include "cmCryptoHash.h" #include "cmDuration.h" #include "cmGlobalGenerator.h" #include "cmList.h" @@ -1692,11 +1693,8 @@ int cmcmd::HashSumFile(std::vector<std::string> const& args, std::cerr << "Error: " << filename << " is a directory" << std::endl; retval++; } else { - std::string value -#ifndef CMAKE_BOOTSTRAP - = cmSystemTools::ComputeFileHash(filename, algo) -#endif - ; + cmCryptoHash hasher(algo); + std::string value = hasher.HashFile(filename); if (value.empty()) { // To mimic "md5sum/shasum" behavior in a shell: std::cerr << filename << ": No such file or directory" << std::endl; |