diff options
author | Brad King <brad.king@kitware.com> | 2021-10-27 16:58:02 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-10-27 16:58:02 (GMT) |
commit | efc6c23a47e456b066089ed6f8fd11a1ca4396d3 (patch) | |
tree | db943cd15d492038d8286484e857c1e77a148be7 /Source/cmSystemTools.cxx | |
parent | af6414c6c5e9767f0f997523af8fe1e5a71f6093 (diff) | |
download | CMake-efc6c23a47e456b066089ed6f8fd11a1ca4396d3.zip CMake-efc6c23a47e456b066089ed6f8fd11a1ca4396d3.tar.gz CMake-efc6c23a47e456b066089ed6f8fd11a1ca4396d3.tar.bz2 |
bootstrap: Do not declare cmSystemTools functions that are not implemented
Convert runtime error messages into compile-time errors.
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 7d878b2..1b07358 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1158,39 +1158,26 @@ void cmSystemTools::MoveFileIfDifferent(const std::string& source, RemoveFile(source); } +#ifndef CMAKE_BOOTSTRAP std::string cmSystemTools::ComputeFileHash(const std::string& source, cmCryptoHash::Algo algo) { -#if !defined(CMAKE_BOOTSTRAP) cmCryptoHash hash(algo); return hash.HashFile(source); -#else - (void)source; - cmSystemTools::Message("hashsum not supported in bootstrapping mode", - "Error"); - return std::string(); -#endif } std::string cmSystemTools::ComputeStringMD5(const std::string& input) { -#if !defined(CMAKE_BOOTSTRAP) cmCryptoHash md5(cmCryptoHash::AlgoMD5); return md5.HashString(input); -#else - (void)input; - cmSystemTools::Message("md5sum not supported in bootstrapping mode", - "Error"); - return ""; -#endif } +# ifdef _WIN32 std::string cmSystemTools::ComputeCertificateThumbprint( const std::string& source) { std::string thumbprint; -#if !defined(CMAKE_BOOTSTRAP) && defined(_WIN32) CRYPT_INTEGER_BLOB cryptBlob; HCERTSTORE certStore = NULL; PCCERT_CONTEXT certContext = NULL; @@ -1247,14 +1234,11 @@ std::string cmSystemTools::ComputeCertificateThumbprint( } CloseHandle(certFile); } -#else - (void)source; - cmSystemTools::Message("ComputeCertificateThumbprint is not implemented", - "Error"); -#endif return thumbprint; } +# endif +#endif void cmSystemTools::Glob(const std::string& directory, const std::string& regexp, |