mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 00:08:59 +08:00
[cryptopp] clang-cl: fix compilation with cryptopp/gzip.h (#40679)
Co-authored-by: Cheney Wang <38240633+Cheney-W@users.noreply.github.com>
This commit is contained in:
parent
15958906f3
commit
a01cae2636
26
ports/cryptopp/cryptopp.patch
Normal file
26
ports/cryptopp/cryptopp.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/secblock.h b/secblock.h
|
||||
index 5ab920f9..74d939cf 100644
|
||||
--- a/secblock.h
|
||||
+++ b/secblock.h
|
||||
@@ -270,7 +270,7 @@ public:
|
||||
/// \details VS.NET STL enforces the policy of "All STL-compliant allocators
|
||||
/// have to provide a template class member called rebind".
|
||||
template <class V> struct rebind { typedef AllocatorWithCleanup<V, T_Align16> other; };
|
||||
-#if (CRYPTOPP_MSC_VERSION >= 1500)
|
||||
+#if (CRYPTOPP_MSC_VERSION >= 1500) || defined(__clang__)
|
||||
AllocatorWithCleanup() {}
|
||||
template <class V, bool A> AllocatorWithCleanup(const AllocatorWithCleanup<V, A> &) {}
|
||||
#endif
|
||||
diff --git a/zdeflate.cpp b/zdeflate.cpp
|
||||
index b3514b55..20717c24 100644
|
||||
--- a/zdeflate.cpp
|
||||
+++ b/zdeflate.cpp
|
||||
@@ -413,7 +413,7 @@ unsigned int Deflator::LongestMatch(unsigned int &bestMatch) const
|
||||
{
|
||||
CRYPTOPP_ASSERT(scan[2] == match[2]);
|
||||
unsigned int len = (unsigned int)(
|
||||
-#if defined(_STDEXT_BEGIN) && !(defined(CRYPTOPP_MSC_VERSION) && (CRYPTOPP_MSC_VERSION < 1400 || CRYPTOPP_MSC_VERSION >= 1600)) && !defined(_STLPORT_VERSION)
|
||||
+#if defined(_STDEXT_BEGIN) && !(defined(CRYPTOPP_MSC_VERSION) && (CRYPTOPP_MSC_VERSION < 1400 || CRYPTOPP_MSC_VERSION >= 1600)) && !defined(_STLPORT_VERSION) && !defined(__clang__)
|
||||
stdext::unchecked_mismatch
|
||||
#else
|
||||
std::mismatch
|
@ -15,7 +15,9 @@ vcpkg_from_github(
|
||||
REF "CRYPTOPP_${CRYPTOPP_VERSION}"
|
||||
SHA512 28a67141155c9c15e3e6a2173b3a8487cc38a2a2ade73bf4a09814ca541be6b06e9a501be26f7e2f42a2f80df21b076aa5d8ad4224dc0a1f8d7f3b24deae465e
|
||||
HEAD_REF master
|
||||
PATCHES patch.patch
|
||||
PATCHES
|
||||
patch.patch
|
||||
cryptopp.patch
|
||||
)
|
||||
|
||||
file(COPY "${CMAKE_SOURCE_PATH}/cryptopp" DESTINATION "${SOURCE_PATH}")
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "cryptopp",
|
||||
"version": "8.9.0",
|
||||
"port-version": 1,
|
||||
"description": "Crypto++ is a free C++ class library of cryptographic schemes.",
|
||||
"homepage": "https://github.com/weidai11/cryptopp",
|
||||
"license": "BSL-1.0",
|
||||
|
@ -2046,7 +2046,7 @@
|
||||
},
|
||||
"cryptopp": {
|
||||
"baseline": "8.9.0",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"cserialport": {
|
||||
"baseline": "4.3.1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "d0e6dbcd3cb14acffac5ce963dc8fcd1178101fc",
|
||||
"version": "8.9.0",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "48788514ae1e84dea9055e603527c91f92c124fb",
|
||||
"version": "8.9.0",
|
||||
|
Loading…
Reference in New Issue
Block a user